Unity thing are starting to work

This commit is contained in:
Pascal Serrarens 2025-02-04 17:15:00 +01:00
parent 246a2b9a3a
commit 425cd8d6f9

View File

@ -148,6 +148,8 @@ namespace Passer.Control.Core {
Thing.Add(this);
}
public virtual void CreateComponent() {}
#endregion Init
#region Update
@ -193,7 +195,6 @@ namespace Passer.Control.Core {
public static event ThingHandler OnNewThing;
public static void Add(Thing thing, bool invokeEvent = true) {
//UnityEngine.Debug.Log("added thing");
Console.WriteLine("added thing");
Thing foundThing = Get(thing.networkId, thing.id);
@ -203,7 +204,7 @@ namespace Passer.Control.Core {
allThings.Add(thing);
if (invokeEvent)
OnNewThing?.Invoke(thing);
//UnityEngine.Debug.Log($"Add thing [{thing.networkId}/{thing.id}] {thing.name}");
Console.Write($"Add thing [{thing.networkId}/{thing.id}] {thing.name}");
}
}