public unsafe override void Load(FakeStruct fake)
 {
     data             = *(SpriteRenderData *)fake.ip;
     assetsName       = fake.buffer.GetData(data.assetName) as string;
     textureName      = fake.buffer.GetData(data.textureName) as string;
     spriteName       = fake.buffer.GetData(data.spriteName) as string;
     sortingLayerName = fake.buffer.GetData(data.sortingLayerName) as string;
     shader           = fake.buffer.GetData(data.shaderName) as string;
 }
        public static void LoadToObject(Component game, ref SpriteRenderData data, SpriteRenderModel mod)
        {
            var obj = game.GetComponent <SpriteRenderer>();

            if (obj == null)
            {
                return;
            }
            obj.renderingLayerMask          = data.renderingLayerMask;
            obj.rendererPriority            = data.rendererPriority;
            obj.sortingLayerID              = data.sortingLayerID;
            obj.sortingOrder                = data.sortingOrder;
            obj.allowOcclusionWhenDynamic   = data.allowOcclusionWhenDynamic;
            obj.lightmapIndex               = data.lightmapIndex;
            obj.realtimeLightmapIndex       = data.realtimeLightmapIndex;
            obj.lightmapScaleOffset         = data.lightmapScaleOffset;
            obj.realtimeLightmapScaleOffset = data.realtimeLightmapScaleOffset;
            obj.reflectionProbeUsage        = data.reflectionProbeUsage;
            obj.lightProbeUsage             = data.lightProbeUsage;
            obj.receiveShadows              = data.receiveShadows;
            obj.motionVectorGenerationMode  = data.motionVectorGenerationMode;
            obj.enabled           = data.enabled;
            obj.shadowCastingMode = data.shadowCastingMode;
            obj.drawMode          = data.drawMode;
            obj.size = data.size;
            obj.adaptiveModeThreshold = data.adaptiveModeThreshold;
            obj.tileMode        = data.tileMode;
            obj.color           = data.color;
            obj.maskInteraction = data.maskInteraction;
            obj.flipX           = data.flipX;
            obj.flipY           = data.flipY;
            obj.spriteSortPoint = data.spriteSortPoint;
            if (mod.textureName != null)
            {
                obj.sprite = ElementAsset.FindSprite(mod.assetsName, mod.textureName, mod.spriteName);
            }
            else
            {
                obj.sprite = null;
            }
            obj.sortingLayerName = mod.sortingLayerName;
            if (mod.shader != null)
            {
                obj.material = new Material(Shader.Find(mod.shader));
            }
        }