コード例 #1
0
 void TryApplyExampleTextures(FillRenderer3D bar) {
     var textureBar = AssetDatabase.LoadAssetAtPath(
         "Assets/Energy Bar Toolkit/Progress Bar Pack 1/Textures/bar1_bar.png", typeof(Texture2D)) as Texture2D;
     var textureFg = AssetDatabase.LoadAssetAtPath("Assets/Energy Bar Toolkit/Progress Bar Pack 1/Textures/bar1_fg.png", typeof(Texture2D)) as Texture2D;
     
     if (textureBar != null && textureFg != null) {
         bar.textureBar = textureBar;
         var tex = new EnergyBarBase.Tex();
         tex.texture = textureFg;
         tex.color = Color.white;
         
         bar.texturesBackground = new EnergyBarBase.Tex[1];
         bar.texturesBackground[0] = tex;
     }
 }
コード例 #2
0
 static void TryApplyExampleTextures(FilledRenderer3D bar) {
     var textureBar = AssetDatabase.LoadAssetAtPath(
         AssetDatabase.GUIDToAssetPath("cc23715e311bb5944bf44bc1d2fa3aa4"), typeof(Texture2D)) as Texture2D;
     var textureFg = AssetDatabase.LoadAssetAtPath(
         AssetDatabase.GUIDToAssetPath("85dd12640060b1d4285d11cb0f60b8a7"), typeof(Texture2D)) as Texture2D;
     
     if (textureBar != null && textureFg != null) {
         bar.textureBar = textureBar;
         var tex = new EnergyBarBase.Tex();
         tex.texture = textureFg;
         tex.color = Color.white;
         
         bar.texturesBackground = new EnergyBarBase.Tex[1];
         bar.texturesBackground[0] = tex;
     } else {
         Debug.LogWarning("Failed to locate example textures. This is not something bad, but have you changed "
                          + "your Energy Bar Toolkit directory location?");
     }
 }
コード例 #3
0
 static void TryApplyExampleTextures(FilledRenderer3D bar) {
     var textureBar = AssetDatabase.LoadAssetAtPath(
         AssetDatabase.GUIDToAssetPath("cc23715e311bb5944bf44bc1d2fa3aa4"), typeof(Texture2D)) as Texture2D;
     var textureFg = AssetDatabase.LoadAssetAtPath(
         AssetDatabase.GUIDToAssetPath("85dd12640060b1d4285d11cb0f60b8a7"), typeof(Texture2D)) as Texture2D;
     
     if (textureBar != null && textureFg != null) {
         bar.textureBar = textureBar;
         var tex = new EnergyBarBase.Tex();
         tex.texture = textureFg;
         tex.color = Color.white;
         
         bar.texturesBackground = new EnergyBarBase.Tex[1];
         bar.texturesBackground[0] = tex;
     } else {
         Debug.LogWarning("Failed to locate example textures. This is not something bad, but have you changed "
                          + "your Energy Bar Toolkit directory location?");
     }
 }
コード例 #4
0
 static void TryApplyExampleTextures(FilledRenderer3D bar) {
     var textureBar = AssetDatabase.LoadAssetAtPath(
         "Assets/Energy Bar Toolkit/Progress Bar Pack 1/Textures/bar1_bar.png", typeof(Texture2D)) as Texture2D;
     var textureFg = AssetDatabase.LoadAssetAtPath(
         "Assets/Energy Bar Toolkit/Progress Bar Pack 1/Textures/bar1_fg.png", typeof(Texture2D)) as Texture2D;
     
     if (textureBar != null && textureFg != null) {
         bar.textureBar = textureBar;
         var tex = new EnergyBarBase.Tex();
         tex.texture = textureFg;
         tex.color = Color.white;
         
         bar.texturesBackground = new EnergyBarBase.Tex[1];
         bar.texturesBackground[0] = tex;
     } else {
         Debug.LogWarning("Failed to locate example textures. This is not something bad, but have you changed "
                          + "your Energy Bar Toolkit directory location?");
     }
 }
コード例 #5
0
 static void TryApplyExampleTextures(FilledRenderer3D bar) {
     var textureBar = AssetDatabase.LoadAssetAtPath(
         "Assets/Energy Bar Toolkit/Progress Bar Pack 1/Textures/bar1_bar.png", typeof(Texture2D)) as Texture2D;
     var textureFg = AssetDatabase.LoadAssetAtPath(
         "Assets/Energy Bar Toolkit/Progress Bar Pack 1/Textures/bar1_fg.png", typeof(Texture2D)) as Texture2D;
     
     if (textureBar != null && textureFg != null) {
         bar.textureBar = textureBar;
         var tex = new EnergyBarBase.Tex();
         tex.texture = textureFg;
         tex.color = Color.white;
         
         bar.texturesBackground = new EnergyBarBase.Tex[1];
         bar.texturesBackground[0] = tex;
     } else {
         Debug.LogWarning("Failed to locate example textures. This is not something bad, but have you changed "
                          + "your Energy Bar Toolkit directory location?");
     }
 }