mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
EntitySystem
EntitySystem
This commit is contained in:
@@ -1,11 +0,0 @@
|
|||||||
namespace TEngine
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Ecs构架可以将此组件从Entity上移除这个组件并丢入对象池,给其他此刻需要此组件的Entity使用,
|
|
||||||
/// 因此可以节省大量的内存反复创建和释放, 这也是Ecs的特性可以大量重复使用组件
|
|
||||||
/// </summary>
|
|
||||||
public class EcsComponent : EcsObject
|
|
||||||
{
|
|
||||||
public Entity Entity { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: f361f36f4eb725c4391977964b94423e
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@@ -1,10 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace TEngine
|
|
||||||
{
|
|
||||||
public interface ISystemType
|
|
||||||
{
|
|
||||||
Type Type();
|
|
||||||
Type SystemType();
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 4807792c3fd17824e9e7cc8ce8ba9e05
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@@ -1,154 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace TEngine
|
|
||||||
{
|
|
||||||
public interface IAwake
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IAwake<T>
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IAwake<T, U>
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IAwake<T, U, V>
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IAwake<T, U, V, W>
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IAwakeSystem : ISystemType
|
|
||||||
{
|
|
||||||
void Run(object o);
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IAwakeSystem<T> : ISystemType
|
|
||||||
{
|
|
||||||
void Run(object o, T t);
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IAwakeSystem<T, U> : ISystemType
|
|
||||||
{
|
|
||||||
void Run(object o, T t, U u);
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IAwakeSystem<T, U, V> : ISystemType
|
|
||||||
{
|
|
||||||
void Run(object o, T t, U u, V v);
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IAwakeSystem<T, U, V, W> : ISystemType
|
|
||||||
{
|
|
||||||
void Run(object o, T t, U u, V v, W w);
|
|
||||||
}
|
|
||||||
|
|
||||||
[ObjectSystem]
|
|
||||||
public abstract class AwakeSystem<T> : IAwakeSystem where T : IAwake
|
|
||||||
{
|
|
||||||
public Type Type()
|
|
||||||
{
|
|
||||||
return typeof(T);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Type SystemType()
|
|
||||||
{
|
|
||||||
return typeof(IAwakeSystem);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Run(object o)
|
|
||||||
{
|
|
||||||
this.Awake((T)o);
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract void Awake(T self);
|
|
||||||
}
|
|
||||||
|
|
||||||
[ObjectSystem]
|
|
||||||
public abstract class AwakeSystem<T, A> : IAwakeSystem<A> where T : IAwake<A>
|
|
||||||
{
|
|
||||||
public Type Type()
|
|
||||||
{
|
|
||||||
return typeof(T);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Type SystemType()
|
|
||||||
{
|
|
||||||
return typeof(IAwakeSystem<A>);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Run(object o, A a)
|
|
||||||
{
|
|
||||||
this.Awake((T)o, a);
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract void Awake(T self, A a);
|
|
||||||
}
|
|
||||||
|
|
||||||
[ObjectSystem]
|
|
||||||
public abstract class AwakeSystem<T, A, B> : IAwakeSystem<A, B> where T : IAwake<A, B>
|
|
||||||
{
|
|
||||||
public Type Type()
|
|
||||||
{
|
|
||||||
return typeof(T);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Type SystemType()
|
|
||||||
{
|
|
||||||
return typeof(IAwakeSystem<A, B>);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Run(object o, A a, B b)
|
|
||||||
{
|
|
||||||
this.Awake((T)o, a, b);
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract void Awake(T self, A a, B b);
|
|
||||||
}
|
|
||||||
|
|
||||||
[ObjectSystem]
|
|
||||||
public abstract class AwakeSystem<T, A, B, C> : IAwakeSystem<A, B, C> where T : IAwake<A, B, C>
|
|
||||||
{
|
|
||||||
public Type Type()
|
|
||||||
{
|
|
||||||
return typeof(T);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Type SystemType()
|
|
||||||
{
|
|
||||||
return typeof(IAwakeSystem<A, B, C>);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Run(object o, A a, B b, C c)
|
|
||||||
{
|
|
||||||
this.Awake((T)o, a, b, c);
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract void Awake(T self, A a, B b, C c);
|
|
||||||
}
|
|
||||||
|
|
||||||
[ObjectSystem]
|
|
||||||
public abstract class AwakeSystem<T, A, B, C, D> : IAwakeSystem<A, B, C, D> where T : IAwake<A, B, C, D>
|
|
||||||
{
|
|
||||||
public Type Type()
|
|
||||||
{
|
|
||||||
return typeof(T);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Type SystemType()
|
|
||||||
{
|
|
||||||
return typeof(IAwakeSystem<A, B, C, D>);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Run(object o, A a, B b, C c, D d)
|
|
||||||
{
|
|
||||||
this.Awake((T)o, a, b, c, d);
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract void Awake(T self, A a, B b, C c, D d);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 8b44f8b7436d5f842b74580708345602
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@@ -1,37 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace TEngine
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Ecs组件物理更新接口(减少组件for循环开销)
|
|
||||||
/// </summary>
|
|
||||||
public interface IFixedUpdate
|
|
||||||
{
|
|
||||||
void FixedUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IFixedUpdateSystem : ISystemType
|
|
||||||
{
|
|
||||||
void Run(object o);
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract class FixedUpdateSystem<T> : IFixedUpdateSystem where T : IFixedUpdate
|
|
||||||
{
|
|
||||||
public void Run(object o)
|
|
||||||
{
|
|
||||||
this.FixedUpdate((T)o);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Type Type()
|
|
||||||
{
|
|
||||||
return typeof(T);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Type SystemType()
|
|
||||||
{
|
|
||||||
return typeof(IUpdateSystem);
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract void FixedUpdate(T self);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: a5d5fe02a754ab04a994132d573121b2
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@@ -1,37 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace TEngine
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Ecs组件物理更新接口(减少组件for循环开销)
|
|
||||||
/// </summary>
|
|
||||||
public interface ILateUpdate
|
|
||||||
{
|
|
||||||
void LateUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface ILateUpdateSystem : ISystemType
|
|
||||||
{
|
|
||||||
void Run(object o);
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract class LateUpdateSystem<T> : ILateUpdateSystem where T : ILateUpdate
|
|
||||||
{
|
|
||||||
public void Run(object o)
|
|
||||||
{
|
|
||||||
this.LateUpdate((T)o);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Type Type()
|
|
||||||
{
|
|
||||||
return typeof(T);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Type SystemType()
|
|
||||||
{
|
|
||||||
return typeof(IUpdateSystem);
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract void LateUpdate(T self);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,37 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace TEngine
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Ecs组件更新接口(减少组件for循环开销)
|
|
||||||
/// </summary>
|
|
||||||
public interface IUpdate
|
|
||||||
{
|
|
||||||
void Update();
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IUpdateSystem : ISystemType
|
|
||||||
{
|
|
||||||
void Run(object o);
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract class UpdateSystem<T> : IUpdateSystem where T : IUpdate
|
|
||||||
{
|
|
||||||
public void Run(object o)
|
|
||||||
{
|
|
||||||
this.Update((T)o);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Type Type()
|
|
||||||
{
|
|
||||||
return typeof(T);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Type SystemType()
|
|
||||||
{
|
|
||||||
return typeof(IUpdateSystem);
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract void Update(T self);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 48e6061eb63189142bb682b49473156e
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@@ -2,7 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace TEngine
|
namespace TEngine.EntityModule
|
||||||
{
|
{
|
||||||
public interface IIndex
|
public interface IIndex
|
||||||
{
|
{
|
@@ -3,7 +3,7 @@
|
|||||||
namespace TEngine
|
namespace TEngine
|
||||||
{
|
{
|
||||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
|
||||||
public class ObjectSystemAttribute : BaseAttribute
|
public class EntitySystemAttribute : BaseAttribute
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: e93d874e10ffedf488c413fd5bbc012f
|
guid: 418bff9105ad99345837c9356c38d68b
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
@@ -8,26 +8,26 @@ public class EcsDemoApp : MonoBehaviour
|
|||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
var entity = Entity.Create<Entity>();
|
var entity = Entity.Create<Entity>();
|
||||||
EcsGameObject actor = entity.AddComponent<EcsGameObject>();
|
GameObjectCmpt actor = entity.AddComponent<GameObjectCmpt>();
|
||||||
actor.Name = typeof(EcsGameObject).ToString();
|
actor.Name = typeof(GameObjectCmpt).ToString();
|
||||||
actor.gameObject = Instantiate(@object);
|
actor.gameObject = Instantiate(@object);
|
||||||
actor.transform = actor.gameObject.GetComponent<Transform>();
|
actor.transform = actor.gameObject.GetComponent<Transform>();
|
||||||
entity.AddComponent<EcsComponent>();
|
entity.AddComponent<EntityComponent>();
|
||||||
entity.CheckDebugInfo(actor.gameObject);
|
entity.CheckDebugInfo(actor.gameObject);
|
||||||
Debug.Log(entity.ToString());
|
Debug.Log(entity.ToString());
|
||||||
|
|
||||||
var entity2 = Entity.Create<Entity>();
|
var entity2 = Entity.Create<Entity>();
|
||||||
EcsGameObject actor2 = entity2.AddComponent<EcsGameObject>();
|
GameObjectCmpt actor2 = entity2.AddComponent<GameObjectCmpt>();
|
||||||
actor2.Name = typeof(EcsGameObject).ToString();
|
actor2.Name = typeof(GameObjectCmpt).ToString();
|
||||||
actor2.gameObject = Instantiate(@object);
|
actor2.gameObject = Instantiate(@object);
|
||||||
actor2.transform = actor2.gameObject.GetComponent<Transform>();
|
actor2.transform = actor2.gameObject.GetComponent<Transform>();
|
||||||
entity2.AddComponent<EcsComponent>();
|
entity2.AddComponent<EntityComponent>();
|
||||||
entity2.CheckDebugInfo(actor2.gameObject);
|
entity2.CheckDebugInfo(actor2.gameObject);
|
||||||
Debug.Log(entity2.ToString());
|
Debug.Log(entity2.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
EcsSystem.Instance.Update();
|
EntitySystem.Instance.Update();
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace TEngine
|
namespace TEngine.EntityModule
|
||||||
{
|
{
|
||||||
public enum EcsDebugType
|
public enum EcsDebugType
|
||||||
{
|
{
|
@@ -2,10 +2,10 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
|
|
||||||
namespace TEngine
|
namespace TEngine.EntityModule
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Ecs架构基类Object
|
/// Entity架构基类Object
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EcsObject
|
public class EcsObject
|
||||||
{
|
{
|
||||||
@@ -21,7 +21,7 @@ namespace TEngine
|
|||||||
private set;
|
private set;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal EcsSystem System;
|
internal EntitySystem System;
|
||||||
|
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
@@ -30,15 +30,15 @@ namespace TEngine
|
|||||||
public EcsObject()
|
public EcsObject()
|
||||||
{
|
{
|
||||||
HashCode = GetType().GetHashCode();
|
HashCode = GetType().GetHashCode();
|
||||||
InstanceId = EcsSystem.Instance.CurInstanceId;
|
InstanceId = EntitySystem.Instance.CurInstanceId;
|
||||||
EcsSystem.Instance.CurInstanceId++;
|
EntitySystem.Instance.CurInstanceId++;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void Dispose()
|
public virtual void Dispose()
|
||||||
{
|
{
|
||||||
if (InstanceId != 0)
|
if (InstanceId != 0)
|
||||||
{
|
{
|
||||||
EcsSystem.Instance.EcsObjects.Remove(InstanceId);
|
EntitySystem.Instance.EcsObjects.Remove(InstanceId);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -58,19 +58,18 @@ namespace TEngine
|
|||||||
/// <param name="reuse">此对象是否可以复用,复用会将对象丢入System对象池中 等待再次使用,如果是Entity对象,并且不复用的话,则把Entity所使用的组件也不复用</param>
|
/// <param name="reuse">此对象是否可以复用,复用会将对象丢入System对象池中 等待再次使用,如果是Entity对象,并且不复用的话,则把Entity所使用的组件也不复用</param>
|
||||||
public static void Destroy(EcsObject ecsObject, bool reuse = true)
|
public static void Destroy(EcsObject ecsObject, bool reuse = true)
|
||||||
{
|
{
|
||||||
if (ecsObject is EcsComponent ecsComponent)
|
if (ecsObject is EntityComponent entityComponent)
|
||||||
{
|
{
|
||||||
ecsComponent.Entity.Components.Remove(ecsComponent);
|
entityComponent.Entity.Components.Remove(entityComponent);
|
||||||
if (ecsComponent is IUpdate update)
|
if (entityComponent is IUpdate update)
|
||||||
{
|
{
|
||||||
ecsComponent.Entity.Updates.Remove(update);
|
entityComponent.Entity.Updates.Remove(update);
|
||||||
}
|
}
|
||||||
if (reuse)
|
if (reuse)
|
||||||
{
|
{
|
||||||
ecsComponent.Entity.System.Push(ecsComponent);
|
entityComponent.Entity.System.Push(entityComponent);
|
||||||
}
|
}
|
||||||
ecsObject.OnDestroy();
|
ecsObject.OnDestroy();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
else if (ecsObject is Entity entity)
|
else if (ecsObject is Entity entity)
|
||||||
{
|
{
|
||||||
@@ -78,12 +77,12 @@ namespace TEngine
|
|||||||
entity.OnDestroy();
|
entity.OnDestroy();
|
||||||
while (entity.Components.Count > 0)
|
while (entity.Components.Count > 0)
|
||||||
{
|
{
|
||||||
EcsComponent ecsComponentTemp = entity.Components[0];
|
EntityComponent entityComponentTemp = entity.Components[0];
|
||||||
entity.Components.RemoveAt(0);
|
entity.Components.RemoveAt(0);
|
||||||
ecsComponentTemp.OnDestroy();
|
entityComponentTemp.OnDestroy();
|
||||||
if (reuse)
|
if (reuse)
|
||||||
{
|
{
|
||||||
entity.System.Push(ecsComponentTemp);
|
entity.System.Push(entityComponentTemp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
entity.Updates.Clear();
|
entity.Updates.Clear();
|
||||||
@@ -93,6 +92,7 @@ namespace TEngine
|
|||||||
entity.System.Push(entity);
|
entity.System.Push(entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ecsObject.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
public T FindObjectOfType<T>() where T : EcsObject
|
public T FindObjectOfType<T>() where T : EcsObject
|
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace TEngine
|
namespace TEngine.EntityModule
|
||||||
{
|
{
|
||||||
[Flags]
|
[Flags]
|
||||||
public enum EntityStatus : byte
|
public enum EntityStatus : byte
|
||||||
@@ -39,21 +39,26 @@ namespace TEngine
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[IgnoreDataMember]
|
||||||
|
private bool IsDispose => (this.status & EntityStatus.IsDispose) == EntityStatus.IsDispose;
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
internal List<EcsComponent> Components = new List<EcsComponent>();
|
internal List<EntityComponent> Components = new List<EntityComponent>();
|
||||||
internal List<IUpdate> Updates = new List<IUpdate>();
|
internal List<IUpdate> Updates = new List<IUpdate>();
|
||||||
internal List<IFixedUpdate> FixedUpdates = new List<IFixedUpdate>();
|
internal List<IFixedUpdate> FixedUpdates = new List<IFixedUpdate>();
|
||||||
|
internal List<ILateUpdate> LateUpdates = new List<ILateUpdate>();
|
||||||
internal bool InActive;
|
internal bool InActive;
|
||||||
internal bool CanUpdate;
|
internal bool CanUpdate;
|
||||||
internal bool CanFixedUpdate;
|
internal bool CanFixedUpdate;
|
||||||
|
internal bool CanLateUpdate;
|
||||||
public int Index { get; set; } = -1;
|
public int Index { get; set; } = -1;
|
||||||
public EcsEventCmpt Event { get; set; }
|
|
||||||
public Entity()
|
public Entity()
|
||||||
{
|
{
|
||||||
InActive = true;
|
InActive = true;
|
||||||
System = EcsSystem.Instance;
|
System = EntitySystem.Instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
~Entity()
|
~Entity()
|
||||||
@@ -61,7 +66,7 @@ namespace TEngine
|
|||||||
InActive = false;
|
InActive = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void Execute()
|
internal void Update()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < Updates.Count; i++)
|
for (int i = 0; i < Updates.Count; i++)
|
||||||
{
|
{
|
||||||
@@ -77,6 +82,14 @@ namespace TEngine
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal void LateUpdate()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < LateUpdates.Count; i++)
|
||||||
|
{
|
||||||
|
LateUpdates[i].LateUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
string str = "[";
|
string str = "[";
|
||||||
@@ -132,7 +145,7 @@ namespace TEngine
|
|||||||
#region Static
|
#region Static
|
||||||
public static T Create<T>() where T : Entity, new()
|
public static T Create<T>() where T : Entity, new()
|
||||||
{
|
{
|
||||||
var entity = EcsSystem.Instance.Create<T>();
|
var entity = EntitySystem.Instance.Create<T>();
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
19
Assets/TEngine/Runtime/Entity/EntityComponent.cs
Normal file
19
Assets/TEngine/Runtime/Entity/EntityComponent.cs
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
namespace TEngine.EntityModule
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Entity构架可以将此组件从Entity上移除这个组件并丢入对象池,给其他此刻需要此组件的Entity使用,
|
||||||
|
/// 因此可以节省大量的内存反复创建和释放, 这也是Entity的特性可以大量重复使用组件
|
||||||
|
/// </summary>
|
||||||
|
public class EntityComponent : EcsObject
|
||||||
|
{
|
||||||
|
public Entity Entity { get; set; }
|
||||||
|
|
||||||
|
#region Static
|
||||||
|
public static T Create<T>() where T : EntityComponent, new()
|
||||||
|
{
|
||||||
|
var entity = EntitySystem.Instance.CreateComponent<T>();
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: fc4379fdd792a8f40a239d9222598c93
|
guid: 6f60a73d6fbcb0a4ab868419f1a7706e
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
@@ -1,76 +1,31 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace TEngine
|
namespace TEngine.EntityModule
|
||||||
{
|
{
|
||||||
partial class Entity
|
partial class Entity
|
||||||
{
|
{
|
||||||
public void RmvComponent<T>() where T : EcsComponent, new()
|
public void RmvComponent<T>(T component) where T :EntityComponent, new()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < Components.Count; i++)
|
if (component is IUpdate update)
|
||||||
{
|
{
|
||||||
if (Components[i] is T component)
|
Updates.Remove(update);
|
||||||
{
|
}
|
||||||
if (component is IUpdate update)
|
else if (component is IFixedUpdate fixedUpdate)
|
||||||
{
|
{
|
||||||
Updates.Remove(update);
|
FixedUpdates.Remove(fixedUpdate);
|
||||||
}
|
|
||||||
else if (component is IFixedUpdate fixedUpdate)
|
|
||||||
{
|
|
||||||
FixedUpdates.Remove(fixedUpdate);
|
|
||||||
}
|
|
||||||
System.Push(component);
|
|
||||||
|
|
||||||
CanUpdate = Updates.Count > 0;
|
|
||||||
|
|
||||||
CanFixedUpdate = FixedUpdates.Count > 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if UNITY_EDITOR
|
CanUpdate = Updates.Count > 0;
|
||||||
CheckDebugInfo();
|
|
||||||
#endif
|
CanFixedUpdate = FixedUpdates.Count > 0;
|
||||||
|
|
||||||
|
Destroy(component);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RmvComponent(Type componentType)
|
public T AddComponent<T>() where T :EntityComponent, new()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < Components.Count; i++)
|
T component = EntityComponent.Create<T>();
|
||||||
{
|
|
||||||
if (Components[i].GetType() == componentType)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (componentType is IUpdate update)
|
|
||||||
{
|
|
||||||
Updates.Remove(update);
|
|
||||||
|
|
||||||
CanUpdate = Updates.Count > 0;
|
|
||||||
}
|
|
||||||
else if (componentType is IFixedUpdate fixedUpdate)
|
|
||||||
{
|
|
||||||
FixedUpdates.Remove(fixedUpdate);
|
|
||||||
|
|
||||||
CanFixedUpdate = FixedUpdates.Count > 0;
|
|
||||||
}
|
|
||||||
//if (componentType is EcsComponent component)
|
|
||||||
//{
|
|
||||||
// System.Push(component);
|
|
||||||
//}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#if UNITY_EDITOR
|
|
||||||
CheckDebugInfo();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
public T AddComponent<T>() where T : EcsComponent, new()
|
|
||||||
{
|
|
||||||
#if UNITY_EDITOR
|
|
||||||
CheckDebugInfo();
|
|
||||||
#endif
|
|
||||||
T component = System.Get<T>();
|
|
||||||
component.Entity = this;
|
component.Entity = this;
|
||||||
component.System = System;
|
component.System = System;
|
||||||
Components.Add(component);
|
Components.Add(component);
|
||||||
@@ -88,11 +43,8 @@ namespace TEngine
|
|||||||
return component;
|
return component;
|
||||||
}
|
}
|
||||||
|
|
||||||
public EcsComponent AddComponent(EcsComponent component)
|
public EntityComponent AddComponent(EntityComponent component)
|
||||||
{
|
{
|
||||||
#if UNITY_EDITOR
|
|
||||||
CheckDebugInfo();
|
|
||||||
#endif
|
|
||||||
component.Entity = this;
|
component.Entity = this;
|
||||||
component.System = System;
|
component.System = System;
|
||||||
Components.Add(component);
|
Components.Add(component);
|
||||||
@@ -110,7 +62,7 @@ namespace TEngine
|
|||||||
return component;
|
return component;
|
||||||
}
|
}
|
||||||
|
|
||||||
public T GetComponent<T>() where T : EcsComponent
|
public T GetComponent<T>() where T :EntityComponent
|
||||||
{
|
{
|
||||||
for (int i = 0; i < Components.Count; i++)
|
for (int i = 0; i < Components.Count; i++)
|
||||||
{
|
{
|
||||||
@@ -123,7 +75,7 @@ namespace TEngine
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public EcsComponent GetComponent(Type componentType)
|
public EntityComponent GetComponent(Type componentType)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < Components.Count; i++)
|
for (int i = 0; i < Components.Count; i++)
|
||||||
{
|
{
|
||||||
@@ -136,7 +88,7 @@ namespace TEngine
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public T[] GetComponents<T>() where T : EcsComponent
|
public T[] GetComponents<T>() where T :EntityComponent
|
||||||
{
|
{
|
||||||
List<T> elements = new List<T>();
|
List<T> elements = new List<T>();
|
||||||
for (int i = 0; i < Components.Count; i++)
|
for (int i = 0; i < Components.Count; i++)
|
||||||
@@ -149,7 +101,7 @@ namespace TEngine
|
|||||||
return elements.ToArray();
|
return elements.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<T> GetComponentsList<T>() where T : EcsComponent
|
public List<T> GetComponentsList<T>() where T :EntityComponent
|
||||||
{
|
{
|
||||||
List<T> elements = new List<T>();
|
List<T> elements = new List<T>();
|
||||||
for (int i = 0; i < Components.Count; i++)
|
for (int i = 0; i < Components.Count; i++)
|
||||||
@@ -162,9 +114,9 @@ namespace TEngine
|
|||||||
return elements;
|
return elements;
|
||||||
}
|
}
|
||||||
|
|
||||||
public EcsComponent[] GetComponents(Type comType)
|
public EntityComponent[] GetComponents(Type comType)
|
||||||
{
|
{
|
||||||
List<EcsComponent> elements = new List<EcsComponent>();
|
List<EntityComponent> elements = new List<EntityComponent>();
|
||||||
for (int i = 0; i < Components.Count; i++)
|
for (int i = 0; i < Components.Count; i++)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
@@ -176,6 +128,5 @@ namespace TEngine
|
|||||||
}
|
}
|
||||||
return elements.ToArray();
|
return elements.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,31 +1,30 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace TEngine
|
namespace TEngine.EntityModule
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Ecs系统
|
/// Entity系统
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class EcsSystem : IDisposable
|
public class EntitySystem : IDisposable
|
||||||
{
|
{
|
||||||
private static EcsSystem _instance;
|
private static EntitySystem _instance;
|
||||||
|
|
||||||
public static EcsSystem Instance
|
public static EntitySystem Instance
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (_instance == null)
|
if (_instance == null)
|
||||||
{
|
{
|
||||||
_instance = new EcsSystem();
|
_instance = new EntitySystem();
|
||||||
}
|
}
|
||||||
|
|
||||||
return _instance;
|
return _instance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private EcsSystem()
|
private EntitySystem()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -34,22 +33,22 @@ namespace TEngine
|
|||||||
internal readonly Dictionary<int, Stack<EcsObject>> ObjectPool = new Dictionary<int, Stack<EcsObject>>();
|
internal readonly Dictionary<int, Stack<EcsObject>> ObjectPool = new Dictionary<int, Stack<EcsObject>>();
|
||||||
internal readonly ArrayPool<Entity> Entities = new ArrayPool<Entity>();
|
internal readonly ArrayPool<Entity> Entities = new ArrayPool<Entity>();
|
||||||
internal readonly Dictionary<int, EcsObject> EcsObjects = new Dictionary<int, EcsObject>();
|
internal readonly Dictionary<int, EcsObject> EcsObjects = new Dictionary<int, EcsObject>();
|
||||||
internal readonly Dictionary<int, IUpdateSystem> UpdateSystems = new Dictionary<int, IUpdateSystem>();
|
|
||||||
internal int CurInstanceId = 1000;
|
internal int CurInstanceId = 1000;
|
||||||
|
|
||||||
public void AddEntity(Entity entity)
|
#region internal
|
||||||
|
internal void AddEntity(Entity entity)
|
||||||
{
|
{
|
||||||
entity.System = this;
|
entity.System = this;
|
||||||
entity.Awake();
|
entity.Awake();
|
||||||
Entities.Add(entity);
|
Entities.Add(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveEntity(Entity entity)
|
internal void RemoveEntity(Entity entity)
|
||||||
{
|
{
|
||||||
Entities.Remove(entity);
|
Entities.Remove(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
public T Get<T>() where T : EcsObject, new()
|
private T Get<T>() where T : EcsObject, new()
|
||||||
{
|
{
|
||||||
int type = typeof(T).GetHashCode();
|
int type = typeof(T).GetHashCode();
|
||||||
if (ObjectPool.TryGetValue(type, out Stack<EcsObject> stack))
|
if (ObjectPool.TryGetValue(type, out Stack<EcsObject> stack))
|
||||||
@@ -62,15 +61,14 @@ namespace TEngine
|
|||||||
}
|
}
|
||||||
stack = new Stack<EcsObject>();
|
stack = new Stack<EcsObject>();
|
||||||
ObjectPool.Add(type, stack);
|
ObjectPool.Add(type, stack);
|
||||||
Instantiate: T ecsObject = new T();
|
Instantiate: T ecsObject = new T();
|
||||||
EcsObjects.Add(ecsObject.InstanceId,ecsObject);
|
EcsObjects.Add(ecsObject.InstanceId, ecsObject);
|
||||||
return ecsObject;
|
return ecsObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Push(EcsObject ecsObject)
|
internal void Push(EcsObject ecsObject)
|
||||||
{
|
{
|
||||||
int type = ecsObject.HashCode;
|
int type = ecsObject.HashCode;
|
||||||
ecsObject.Dispose();
|
|
||||||
if (ObjectPool.TryGetValue(type, out Stack<EcsObject> stack))
|
if (ObjectPool.TryGetValue(type, out Stack<EcsObject> stack))
|
||||||
{
|
{
|
||||||
stack.Push(ecsObject);
|
stack.Push(ecsObject);
|
||||||
@@ -80,22 +78,22 @@ namespace TEngine
|
|||||||
ObjectPool.Add(type, stack);
|
ObjectPool.Add(type, stack);
|
||||||
stack.Push(ecsObject);
|
stack.Push(ecsObject);
|
||||||
}
|
}
|
||||||
|
internal T Create<T>() where T : Entity, new()
|
||||||
public T Create<T>() where T : Entity, new()
|
|
||||||
{
|
{
|
||||||
T entity = Get<T>();
|
T entity = Get<T>();
|
||||||
AddEntity(entity);
|
AddEntity(entity);
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
internal T CreateComponent<T>() where T : EntityComponent, new()
|
||||||
public T Create<T>(T entity) where T : Entity, new()
|
|
||||||
{
|
{
|
||||||
AddEntity(entity);
|
T component = Get<T>();
|
||||||
return entity;
|
return component;
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Update
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 更新Ecs系统
|
/// 更新Entity系统
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="worker">线程池是否并行</param>
|
/// <param name="worker">线程池是否并行</param>
|
||||||
public void Update(bool worker = false)
|
public void Update(bool worker = false)
|
||||||
@@ -114,7 +112,7 @@ namespace TEngine
|
|||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Entities[i].Execute();
|
Entities[i].Update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -130,13 +128,13 @@ namespace TEngine
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Entities[i].Execute();
|
Entities[i].Update();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 更新Ecs物理系统
|
/// 更新Entity物理系统
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="worker">线程池是否并行</param>
|
/// <param name="worker">线程池是否并行</param>
|
||||||
public void FixedUpdate(bool worker = false)
|
public void FixedUpdate(bool worker = false)
|
||||||
@@ -175,6 +173,7 @@ namespace TEngine
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region Dispose
|
#region Dispose
|
||||||
public void Dispose()
|
public void Dispose()
|
@@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace TEngine
|
namespace TEngine.EntityModule
|
||||||
{
|
{
|
||||||
public class EcsEventCmpt : EcsComponent
|
public class EventCmpt :EntityComponent
|
||||||
{
|
{
|
||||||
private GameEvent _gameEvent;
|
private GameEvent _gameEvent;
|
||||||
|
|
||||||
@@ -88,7 +88,6 @@ namespace TEngine
|
|||||||
public override void Awake()
|
public override void Awake()
|
||||||
{
|
{
|
||||||
_gameEvent = GameMemPool<GameEvent>.Alloc();
|
_gameEvent = GameMemPool<GameEvent>.Alloc();
|
||||||
Entity.Event = this;
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: af343da6b3090a24b92fc12aaa638411
|
guid: 7e37fd19b27821c49b3bab2d92b2fe37
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
@@ -1,9 +1,9 @@
|
|||||||
namespace TEngine
|
namespace TEngine.EntityModule
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Ecs Actor
|
/// Entity Actor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EcsGameObject : EcsComponent
|
public class GameObjectCmpt :EntityComponent
|
||||||
{
|
{
|
||||||
public string Name;
|
public string Name;
|
||||||
public UnityEngine.GameObject gameObject;
|
public UnityEngine.GameObject gameObject;
|
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 2e71316dca3cb664d964935745d3b851
|
guid: 559f282b0e220ab4e8ccb2342e13aaf2
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
10
Assets/TEngine/Runtime/Entity/Interface/IFixedUpdate.cs
Normal file
10
Assets/TEngine/Runtime/Entity/Interface/IFixedUpdate.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
namespace TEngine.EntityModule
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Entity组件物理更新接口(减少组件for循环开销)
|
||||||
|
/// </summary>
|
||||||
|
public interface IFixedUpdate
|
||||||
|
{
|
||||||
|
void FixedUpdate();
|
||||||
|
}
|
||||||
|
}
|
11
Assets/TEngine/Runtime/Entity/Interface/IFixedUpdate.cs.meta
Normal file
11
Assets/TEngine/Runtime/Entity/Interface/IFixedUpdate.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8fd15ec3752def44099dd23f93d18d24
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
10
Assets/TEngine/Runtime/Entity/Interface/ILateUpdate.cs
Normal file
10
Assets/TEngine/Runtime/Entity/Interface/ILateUpdate.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
namespace TEngine.EntityModule
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Entity组件物理更新接口(减少组件for循环开销)
|
||||||
|
/// </summary>
|
||||||
|
public interface ILateUpdate
|
||||||
|
{
|
||||||
|
void LateUpdate();
|
||||||
|
}
|
||||||
|
}
|
11
Assets/TEngine/Runtime/Entity/Interface/ILateUpdate.cs.meta
Normal file
11
Assets/TEngine/Runtime/Entity/Interface/ILateUpdate.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5a7758a3d6376b64e96df22d14c947aa
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
10
Assets/TEngine/Runtime/Entity/Interface/IUpdate.cs
Normal file
10
Assets/TEngine/Runtime/Entity/Interface/IUpdate.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
namespace TEngine.EntityModule
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Entity组件更新接口(减少组件for循环开销)
|
||||||
|
/// </summary>
|
||||||
|
public interface IUpdate
|
||||||
|
{
|
||||||
|
void Update();
|
||||||
|
}
|
||||||
|
}
|
11
Assets/TEngine/Runtime/Entity/Interface/IUpdate.cs.meta
Normal file
11
Assets/TEngine/Runtime/Entity/Interface/IUpdate.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c9a60cb450a1e3a48945932e5224ea81
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Reference in New Issue
Block a user