Skip to main content

ToolRegistry.RegisterComponent

Declaration#

public static void RegisterComponent(Object component, bool persistBetweenScenes)

Parameters#

NameDescription
componentComponent to register
persistBetweenScenesKeep component registered between scenes

Description#

Add a component to registry

Usage#

Example
using NullSave.GDTK;using UnityEngine;
public class Example : MonoBehaviour{
    public void ExampleMethod()    {        ToolRegistry.RegisterComponent(this);    }
}

Declaration#

public static void RegisterComponent(Object component, string key, bool persistBetweenScenes)

Parameters#

NameDescription
componentComponent to register
keyKey to associate with component
persistBetweenScenesKeep component registered between scenes

Description#

Add a component to registry

Usage#

Example
using NullSave.GDTK;using UnityEngine;
public class Example : MonoBehaviour{
    public void ExampleMethod()    {        ToolRegistry.RegisterComponent(this, "MyKey");    }
}