Skip to content

Commit

Permalink
[GitHub Action] Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed May 7, 2024
1 parent 2dc1792 commit 8f7db28
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions docs/Mod-Creation/Developer-Reference/Prefabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,26 @@ From the Unity Documentation :
> Unity’s Prefab system allows you to create, configure, and store a GameObject complete with all its components, property values, and child GameObjects as a reusable Asset. \
The Prefab Asset acts as a template from which you can create new Prefab instances in the Scene.

RoR2 isn't an exception and uses Prefabs to load most of its game objects, from bodies of all entities (classes, monsters...) to projectiles, skills and so on.
RoR2 isn't an exception and uses Prefabs to load most of its game objects, from bodies of all entities (classes, monsters...) to projectiles, skills, and so on.

## Getting the values of the Prefabs
Dumper code here : https://gist.github.com/xiaoxiao921/9d7f5aa50676b475f3cf750b5ef57955 \
Dumper code version with state configuration + expanded collection values : https://gist.github.com/yekoc/d632468df9ebc53641170301ac2f67ef
## Prefab text dump
Last updated on 2024/05/06: [prefabs.zip](https://github.com/risk-of-thunder/R2Wiki/files/15218065/prefabs.zip)
ITS ACTUALLY A 7z FILE !!! Change extension from .zip to .7z and use 7zip or winrar for opening.

Already made dump here :
[prefabs.7z](https://github.com/risk-of-thunder/R2Wiki/files/8508041/prefabs.zip)
ITS ACTUALLY A 7z FILE !!! change extension from .zip to .7z and use 7zip or winrar for opening
[Original dumper code](https://gist.github.com/xiaoxiao921/9d7f5aa50676b475f3cf750b5ef57955)

## A more natural approach of reading the values of prefabs is by using Thunderkit with its Addressable Browser
[Extended dumper code](https://gist.github.com/yekoc/d632468df9ebc53641170301ac2f67ef) with state configuration + expanded collection values

TODO FIXME: LINK
[Further extended dumper code](https://gist.github.com/SChinchi/7dd6b321807e9166b65705e6aec96634) including inherited fields/properties and some serialised classes/structs, such as DCCS categories

## Using a runtime inspector

Both the RuntimeInspector and UnityExplorer mods allow you to view and manipulate any loaded game objects in-game.

For a short-lived object, such as a projectile, freezing time is required to inspect it thoroughly. This can be achieved by either UnityExplorer's "Time" input field from the top bar, or by using DebugToolkit and its command `time_scale`, e.g., `time_scale 0`.

Keep in mind that with UnityExplorer you need to have its overlay disabled before entering the lobby or it will break the UI.

## Using Thunderkit

A more natural approach of reading the values of prefabs is by using [Thunderkit's Addressable Browser](https://risk-of-thunder.github.io/R2Wiki/Mod-Creation/Thunderkit/Getting-Started/).

0 comments on commit 8f7db28

Please sign in to comment.