Skip to content
jiepengtan edited this page Nov 20, 2019 · 7 revisions
  • ECSDefine 定义需要继承自 IGameComponent
    public partial class AssetData : IGameComponent {
        public int AssetId;
    }
  • 生成的代码的主体可以在 __DllSourceFiles/Game.Model/Src/__UnsafeECS/Generated/CodeGen_Component.cs 看到
  • 其他细碎的代码在其他文件中可能掺杂
    [StructLayoutAttribute(LayoutKind.Sequential)]
    [System.Serializable]
    public unsafe partial struct AssetData {
        public int AssetId; 
        public override Int32 GetHashCode() {
            unchecked {
                var hash = 7;
                hash = hash * 37 +AssetId.GetHashCode();  
                return hash;
            }
        }
    }
Clone this wiki locally