Inheritance: RendererEditorBase
コード例 #1
0
        private void CheckForErrors()
        {
            if (this.IsMaterialTextureAtlasConflict())
            {
                SpriteRendererEditor.ShowError("Material has CanUseSpriteAtlas=False tag. Sprite texture has atlasHint set. Rendering artifacts possible.");
            }
            bool flag;

            if (!this.DoesMaterialHaveSpriteTexture(out flag))
            {
                SpriteRendererEditor.ShowError("Material does not have a _MainTex texture property. It is required for SpriteRenderer.");
            }
            else if (flag)
            {
                SpriteRendererEditor.ShowError("Material texture property _MainTex has offset/scale set. It is incompatible with SpriteRenderer.");
            }
        }