[Assets] UI 애셋 및 TextMesh Pro 임포트
- Fantasy Warrior HUD 애셋 (Synty Studios) - Interface Core 라이브러리 - TextMesh Pro 패키지 - UI_HealthBar 프리팹
This commit is contained in:
28
Assets/External/InterfaceCore/Scripts/UnityUIExtensions/ShaderLibrary.cs
vendored
Normal file
28
Assets/External/InterfaceCore/Scripts/UnityUIExtensions/ShaderLibrary.cs
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/// Credit SimonDarksideJ
|
||||
/// Updated by Synty: Renamed Unity.UI.Extensions to Synty.Interface.Extensions to avoid conflicts with Unity Ui Extensions and to pass Unity asset store submission.
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Synty.Interface.Extensions
|
||||
{
|
||||
public static class ShaderLibrary
|
||||
{
|
||||
public static Dictionary<string, Shader> shaderInstances = new Dictionary<string, Shader>();
|
||||
public static Shader[] preLoadedShaders;
|
||||
|
||||
public static Shader GetShaderInstance(string shaderName)
|
||||
{
|
||||
if (shaderInstances.ContainsKey(shaderName))
|
||||
{
|
||||
return shaderInstances[shaderName];
|
||||
}
|
||||
|
||||
var newInstance = Shader.Find(shaderName);
|
||||
if (newInstance != null)
|
||||
{
|
||||
shaderInstances.Add(shaderName, newInstance);
|
||||
}
|
||||
return newInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user