Skip to content

Instantly share code, notes, and snippets.

@boformer
Last active February 11, 2016 18:42
Show Gist options
  • Save boformer/701514e1a07395a66cc1 to your computer and use it in GitHub Desktop.
Save boformer/701514e1a07395a66cc1 to your computer and use it in GitHub Desktop.
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