IDynamicFileArrayTexture GetArrayTextureFromKey(MyArrayTextureKey key) { IDynamicFileArrayTexture arrayTexture; if (m_dictTextures.TryGetValue(key, out arrayTexture)) return arrayTexture; string name = key.ToString(); MyFileTextureEnum texType = GetTextureType(key.Channel); byte[] bytePattern = MyGeneratedTexturePatterns.GetBytePattern(key.Channel, key.Format); arrayTexture = MyManagers.DynamicFileArrayTextures.CreateTexture(name, texType, bytePattern, key.Format); m_dictTextures[key] = arrayTexture; return arrayTexture; }
IDynamicFileArrayTexture GetArrayTextureFromKey(MyArrayTextureKey key) { IDynamicFileArrayTexture arrayTexture; if (m_dictTextures.TryGetValue(key, out arrayTexture)) { return(arrayTexture); } string name = key.ToString(); MyFileTextureEnum texType = GetTextureType(key.Channel); byte[] bytePattern = MyGeneratedTexturePatterns.GetBytePattern(key.Channel, key.Format); arrayTexture = MyManagers.DynamicFileArrayTextures.CreateTexture(name, texType, bytePattern, key.Format); m_dictTextures[key] = arrayTexture; return(arrayTexture); }