public void BindScene() { for (int i = 0; i < nodes.Count; i++) { nodes[i].Populate(); } foreach (var factory in factories) { Toolbox.Add(factory); } Add <ProcessorEntities>(); Add <ProcessorObserver>(); if (SettingsEngine.DefineDebugMode) { Add <ProcessorDebug>(); } Setup(); initialized = true; var objs = FindObjectsOfType <MonoBehaviour>().OfType <IRequireStarter>(); foreach (var obj in objs) { obj.Launch(); } Timer.Add(Time.deltaFixed, PostSetup); }
void Awake() { if (ProcessorUpdate.Default == null) { ProcessorUpdate.Create(); } for (var i = 0; i < pluggables.Count; i++) { pluggables[i].Plug(); } if (gameSession != null) { Toolbox.Add(gameSession); } if (gameSettings != null) { Toolbox.Add(gameSettings); } }
/// <summary> /// <para>Adds an object to the toolbox by type. It is mainly used to add processing scripts.</para> /// </summary> /// <typeparam name="T"></typeparam> /// <returns></returns> protected static T Add <T>() where T : new() { return(Toolbox.Add <T>()); }
public void Add <T>() where T : new() { Toolbox.Add <T>(); }