Autor:RiskofThunderLast updated:19/12/2022 01:27:283.4M15KB
R2API.Prefab is a submodule assembly for R2API that allows mod creators to add new Prefabs to the game, these prefabs can later be instantiated like regular prefabs.
The prefabs created via PrefabAPI are mainly created using the method, which instantiates a clone of an existing prefab and leaves it disabled and stored in memory, or create a new prefab using the CreateEmptyPrefab method, this sleeping state mimic the behaviour like regular prefabs in the Unity Editor.
By default the InstantiateClone method assume that it is a prefab with a NetworkIdentity component, and will attempt to register it internally using the RegisterNetworkPrefab method described below
If its not the case make sure to make the bool argument is false when calling InstantiateClone.
You can also use this API for registering prefab to the network client catalog so that its properly networked (when using NetworkServer.Spawn for example) by using the RegisterNetworkPrefab
CreateEmptyPrefab method.CreateEmptyPrefab method.BepInDependency to R2API.ContentManagementR2API.Core.
Download Mods For Free
Install LagoFast, start Risk of Rain 2 and play with the mods you love.