Ejemplo n.º 1
0
    // Token: 0x06000169 RID: 361 RVA: 0x00016898 File Offset: 0x00014A98
    public void LoadShader(string name)
    {
        if (!AssetManager.Reload)
        {
            return;
        }
        AssetManager.Reload = false;
        StringBuilder stringBuilder = new StringBuilder();

        stringBuilder.AppendFormat("{0}!assets/Loading/{1}.unity3d", Application.dataPath, name);
        if (this.Shader)
        {
            this.Shader.Unload(true);
            Handheld.ClearShaderCache();
        }
        if (this.Shader = AssetBundle.CreateFromFile(stringBuilder.ToString()))
        {
            this.Shaders = this.Shader.LoadAll();
        }
    }