GetInstance() публичный статический Метод

public static GetInstance ( NTexture texture, string shaderName, string keywords ) : MaterialManager
texture NTexture
shaderName string
keywords string
Результат MaterialManager
Пример #1
0
        void UpdateManager()
        {
            if (_manager != null)
            {
                _manager.Release();
            }

            if (_texture != null)
            {
                _manager = MaterialManager.GetInstance(_texture, _shader, _materialKeywords);
            }
            else
            {
                _manager = null;
            }
        }
Пример #2
0
 public void SetShaderAndTexture(string shader, NTexture texture)
 {
     _shader  = shader;
     _texture = texture;
     if (_texture != null)
     {
         _manager = MaterialManager.GetInstance(_texture, _shader);
         if (_material != null)
         {
             _material.mainTexture = _texture.nativeTexture;
         }
     }
     else
     {
         if (_material != null)
         {
             _material.mainTexture = null;
         }
         _manager = null;
     }
 }