|
|
|
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Diagnostics; |
|
|
|
using System.IO; |
|
|
|
using System.Linq; |
|
|
|
using System.Runtime.InteropServices; |
|
|
|
|
|
|
using UnityEditor.Graphing; |
|
|
|
using UnityEditor.ShaderGraph; |
|
|
|
using UnityEngine.Rendering; |
|
|
|
using Debug = UnityEngine.Debug; |
|
|
|
using Object = UnityEngine.Object; |
|
|
|
|
|
|
|
namespace UnityEditor.ShaderGraph.Drawing |
|
|
|
|
|
|
|
|
|
|
try |
|
|
|
{ |
|
|
|
var sw = new Stopwatch(); |
|
|
|
sw.Start(); |
|
|
|
var i = 0; |
|
|
|
EditorUtility.DisplayProgressBar("Shader Graph", string.Format("Compiling preview shaders ({0}/{1})", i, count), 0f); |
|
|
|
foreach (var node in masterNodes) |
|
|
|
|
|
|
i++; |
|
|
|
EditorUtility.DisplayProgressBar("Shader Graph", string.Format("Compiling preview shaders ({0}/{1})", i, count), 0f); |
|
|
|
} |
|
|
|
sw.Stop(); |
|
|
|
Debug.LogFormat("Compiled preview shaders in {0} seconds", sw.Elapsed.TotalSeconds); |
|
|
|
} |
|
|
|
finally |
|
|
|
{ |
|
|
|
|
|
|
} |
|
|
|
m_PreviewProperties.Clear(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
foreach (var nodeGuid in m_DirtyPreviews) |
|
|
|
{ |
|
|
|