Eversoul support WIP

Updated line renderer material for handles
Handle fixes
Fixes
This commit is contained in:
2024-04-23 12:25:12 +02:00
parent 11fd1a3d92
commit e5beb1c25a
161 changed files with 18361 additions and 408 deletions

View File

@@ -134,4 +134,11 @@ public class CameraContainer: ObjectContainer
Camera.UpdateImmediate();
}
public override void Destroy()
{
//Do not destroy cameras
Frames.Clear();
SetDefaultFrame();
}
}

View File

@@ -40,6 +40,8 @@ public class ObjectContainer : MonoBehaviour, IKeyframeSetter
{
SetKeyframe();
}
ModelViewerMain.RegisterObject(this);
}
public virtual void PasteContainer(ObjectContainerSerializable bones, PoseLoadOptions pasteParams)
@@ -92,6 +94,7 @@ public class ObjectContainer : MonoBehaviour, IKeyframeSetter
ModelViewerMain.UnregisterObject(this);
if (gameObject != null)
Destroy(gameObject);
ModelViewerMain.OnObjectDeleteEvent.Invoke(this);
Resources.UnloadUnusedAssets();
System.GC.Collect();
}
@@ -234,7 +237,7 @@ public class ObjectContainer : MonoBehaviour, IKeyframeSetter
throw new NotImplementedException(this.GetType().FullName);
}
public void Destroy()
public virtual void Destroy()
{
Destroy(this.gameObject);
}

View File

@@ -34,4 +34,16 @@ public class SceneContainer : ObjectContainer
{
return new SceneSerializable(this);
}
protected override void OnDestroy()
{
if (_applicationQuitting) return;
for (int i = AllObjects.Count - 1; i >= 0; i--)
{
var obj = AllObjects[i];
if (obj == this) continue;
obj.Destroy();
}
}
}