|
|
|
|
|
|
[SerializeField] private float m_Cascade2Split = 0.25f; |
|
|
|
[SerializeField] private Vector3 m_Cascade4Split = new Vector3(0.067f, 0.2f, 0.467f); |
|
|
|
|
|
|
|
[SerializeField] private Material m_DefaultMaterial; |
|
|
|
[SerializeField] private Material m_DefaultParticleMaterial; |
|
|
|
[SerializeField] private Material m_DefaultTerrainMaterial; |
|
|
|
|
|
|
|
|
|
|
|
[SerializeField] private Material m_DefaultMaterial; |
|
|
|
[SerializeField] private Material m_DefaultParticleMaterial; |
|
|
|
[SerializeField] private Material m_DefaultTerrainMaterial; |
|
|
|
|
|
|
|
#if UNITY_EDITOR
|
|
|
|
[UnityEditor.MenuItem("Assets/Create/Render Pipeline/Lightweight/Render Pipeline", priority = CoreUtils.assetCreateMenuPriority1)] |
|
|
|
|
|
|
|
|
|
|
string[] guids = UnityEditor.AssetDatabase.FindAssets("LightweightPipelineResource t:scriptableobject"); |
|
|
|
LightweightPipelineResource resourceAsset = null; |
|
|
|
foreach (string guid in guids) |
|
|
|
{ |
|
|
|
string path = UnityEditor.AssetDatabase.GUIDToAssetPath(guid); |
|
|
|
resourceAsset = UnityEditor.AssetDatabase.LoadAssetAtPath<LightweightPipelineResource>(path); |
|
|
|
if (resourceAsset != null) |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
if (resourceAsset != null) |
|
|
|
{ |
|
|
|
instance.m_DefaultMaterial = resourceAsset.DefaultMaterial; |
|
|
|
instance.m_DefaultParticleMaterial = resourceAsset.DefaultParticleMaterial; |
|
|
|
instance.m_DefaultTerrainMaterial = resourceAsset.DefaultTerrainMaterial; |
|
|
|
} |
|
|
|
|
|
|
|
string path = UnityEditor.EditorUtility.SaveFilePanelInProject("Save Lightweight Asset", "LightweightAsset", "asset", |
|
|
|
string assetPath = UnityEditor.EditorUtility.SaveFilePanelInProject("Save Lightweight Asset", "LightweightAsset", "asset", |
|
|
|
if (path.Length > 0) |
|
|
|
UnityEditor.AssetDatabase.CreateAsset(instance, path); |
|
|
|
if (assetPath.Length > 0) |
|
|
|
UnityEditor.AssetDatabase.CreateAsset(instance, assetPath); |
|
|
|
} |
|
|
|
#endif
|
|
|
|
|
|
|
|