Show / Hide Table of Contents

Class PrefabManager

Handles all logic to do with managing custom prefabs added into the game.

Inheritance
System.Object
Manager
PrefabManager
Namespace: JotunnLib.Managers
Assembly: JotunnLib.dll
Syntax
public class PrefabManager : Manager

Properties

| Improve this Doc View Source

Instance

Declaration
public static PrefabManager Instance { get; }
Property Value
Type Description
PrefabManager

Methods

| Improve this Doc View Source

CreatePrefab(String)

Registers a new prefab that's an empty primitive, with just a ZNetView component

Declaration
public GameObject CreatePrefab(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
GameObject
| Improve this Doc View Source

CreatePrefab(String, String)

Registers a new prefab that's a copy of given base.

Declaration
public GameObject CreatePrefab(string name, string baseName)
Parameters
Type Name Description
System.String name

New prefab name

System.String baseName

Base prefab name

Returns
Type Description
GameObject

New prefab object

| Improve this Doc View Source

GetPrefab(String)

Returns an existing prefab with given name, or null if none exist.

Declaration
public GameObject GetPrefab(string name)
Parameters
Type Name Description
System.String name

Name of the prefab to search for

Returns
Type Description
GameObject
| Improve this Doc View Source

RegisterPrefab(GameObject, String)

Register an existing GameObject as a prefab

Declaration
public void RegisterPrefab(GameObject prefab, string name = null)
Parameters
Type Name Description
GameObject prefab

The GameObject to register as a prefab

System.String name

The name for the prefab. If not provided, will use name of GameObject

| Improve this Doc View Source

RegisterPrefab(PrefabConfig)

Registers a new prefab from given PrefabConfig instance

Declaration
public void RegisterPrefab(PrefabConfig prefabConfig)
Parameters
Type Name Description
PrefabConfig prefabConfig

Prefab configuration

Events

| Improve this Doc View Source

PrefabRegister

Declaration
public event EventHandler PrefabRegister
Event Type
Type Description
System.EventHandler
| Improve this Doc View Source

PrefabsLoaded

Declaration
public event EventHandler PrefabsLoaded
Event Type
Type Description
System.EventHandler
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX