Last active
February 11, 2016 18:42
-
-
Save boformer/701514e1a07395a66cc1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void GetTextureName() | |
{ | |
foreach (KeyValuePair<string, Texture2D> entry in currentPrefabProperties) | |
{ | |
Texture2D texture2D = entry.Value; | |
if(texture2D == null) continue; // null-Werte skippen | |
var filename = ModLoader.currentTexturesPath_default + texture2D.name + ".dds"; | |
if (File.Exists(filename)) | |
{ | |
currentPrefabProperties.Remove(entry.Key); | |
currentPrefabProperties.Add(entry.Key, LoadTextureDDS(filename) as Texture2D); | |
} | |
{ }// do something with entry.Value or entry.Key | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment