void Reset() { uint i = 0xffffffff; cullingMask.value = (int)i; if (spriteMeshRenderer == null) { GameObject obj = new GameObject(name + ".SpriteBatchRenderer"); obj.AddComponent <SpriteBatchRenderer>(); spriteMeshRenderer = obj.GetComponent <SpriteBatchRenderer>(); spriteMeshRenderer.gameObject.hideFlags = HideFlags.NotEditable; //spriteMeshRenderer.parent = this; } }
void Reset() { uint i = 0xffffffff; cullingMask.value = (int)i; if (spriteMeshRenderer == null) { GameObject obj = new GameObject(name + ".SpriteBatchRenderer"); obj.AddComponent<SpriteBatchRenderer>(); spriteMeshRenderer = obj.GetComponent<SpriteBatchRenderer>(); spriteMeshRenderer.gameObject.hideFlags = HideFlags.NotEditable; //spriteMeshRenderer.parent = this; } }