Пример #1
0
        internal static Texture GetCachedTexture(IntPtr key, DummyTextureType type)
        {
            if (cachedTextures.ContainsKey(key))
            {
                return(cachedTextures[key]);
            }

            if (type == DummyTextureType.White)
            {
                return(Texture2D.whiteTexture);
            }
            else
            {
                return(normalTexture);
            }
        }
Пример #2
0
        internal static Texture GetCachedTexture(IntPtr key, DummyTextureType type)
        {
            var cache = cachedTextures.GetResource(key);

            if (cache != null)
            {
                return(cache);
            }

            if (type == DummyTextureType.White)
            {
                return(Texture2D.whiteTexture);
            }
            else
            {
                return(normalTexture);
            }
        }