示例#1
0
 void CheckThrowTextureSet(WorldAtlasMaterial atlasMaterial, WorldAtlasMaterialTextures.TextureSet textureSet, string channelName)
 {
     if (textureSet.top == null)
     {
         ThrowAssetException(atlasMaterial, "Texture set for " + channelName + " is missing 'top' texture!");
     }
     if (textureSet.sides == null)
     {
         ThrowAssetException(atlasMaterial, "Texture set for " + channelName + " is missing 'sides' texture!");
     }
     if (textureSet.bottom == null)
     {
         ThrowAssetException(atlasMaterial, "Texture set for " + channelName + " is missing 'bottom' texture!");
     }
 }
示例#2
0
    void AddTextureSet(WorldAtlasMaterial atlasMaterial, List <Texture2D> arr, List <TextureSet> indices, WorldAtlasMaterialTextures.TextureSet textureSet, string channelName)
    {
        var tSet = new TextureSet()
        {
            top    = AddTextureIndex(arr, textureSet.top),
            sides  = AddTextureIndex(arr, textureSet.sides),
            bottom = AddTextureIndex(arr, textureSet.bottom)
        };

        indices.Add(tSet);
    }