浏览代码

Changed UI update behavior so the CustomEditor for the AdditionalLightData doesn't repaint all the time, anymore.

/main
uygar 8 年前
当前提交
e62577f2
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 6
      Assets/ScriptableRenderPipeline/AdditionalLightData.cs

6
Assets/ScriptableRenderPipeline/AdditionalLightData.cs


}
shadowDatas[idx].format = format;
shadowDatas[idx].data = data != null ? data : new int[0];
UnityEditor.EditorUtility.SetDirty( this );
}
// Load a specific shadow data. Returns null if requested data is not present.
public int[] GetShadowData( int shadowDataFormat )

m_ShadowData = serializedObject.FindProperty( "shadowData" );
m_ShadowDatas = serializedObject.FindProperty( "shadowDatas" );
}
public override void OnInspectorGUI()
{
base.OnInspectorGUI();

UnityEditor.EditorGUI.BeginChangeCheck();
m_ShadowRegistry.Draw( ald.gameObject.GetComponent<Light>() );
serializedObject.Update();
serializedObject.ApplyModifiedProperties();
//UnityEditor.EditorUtility.SetDirty( ald ); // <- doesn't work for some reason
UnityEditor.EditorUtility.SetDirty( ald );
serializedObject.ApplyModifiedProperties();
}
}
}
正在加载...
取消
保存