Ejemplo n.º 1
0
        private static void     SearchShader(MenuCommand menuCommand)
        {
            NGShaderFinderWindow window = EditorWindow.GetWindow <NGShaderFinderWindow>(true, NGShaderFinderWindow.Title);

            window.targetShader = menuCommand.context as Shader;
            window.ClearResults();
        }
Ejemplo n.º 2
0
        private static void     SearchShaderFromMaterial(MenuCommand menuCommand)
        {
            NGShaderFinderWindow window = EditorWindow.GetWindow <NGShaderFinderWindow>(true, NGShaderFinderWindow.Title);

            if ((menuCommand.context as Material) != null)
            {
                window.targetShader = (menuCommand.context as Material).shader;
            }
            window.ClearResults();
        }
Ejemplo n.º 3
0
        private static void     SearchAsset(MenuCommand menuCommand)
        {
            NGShaderFinderWindow window = EditorWindow.GetWindow <NGShaderFinderWindow>(true, NGShaderFinderWindow.Title);

            window.targetShader = Selection.activeObject as Shader;

            if (window.targetShader == null)
            {
                window.targetShader = (Selection.activeObject as Material).shader;
            }
            window.ClearResults();
        }