您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
42 行
1.2 KiB
42 行
1.2 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using UnityEditor.Experimental.UIElements.GraphView;
|
|
|
|
|
|
namespace UnityEditor.MaterialGraph.Drawing
|
|
{
|
|
/* [Serializable]
|
|
class ScatterContolPresenter : GraphControlPresenter
|
|
{
|
|
public override void OnGUIHandler()
|
|
{
|
|
base.OnGUIHandler();
|
|
|
|
var cNode = node as UnityEngine.MaterialGraph.ScatterNode;
|
|
if (cNode == null)
|
|
return;
|
|
|
|
cNode.num = EditorGUILayout.IntField(cNode.num, "Number", null);
|
|
cNode.num = Math.Min(cNode.num, 50); //prevent infinite => hang!
|
|
}
|
|
|
|
public override float GetHeight()
|
|
{
|
|
return EditorGUIUtility.singleLineHeight + 10 * EditorGUIUtility.standardVerticalSpacing;
|
|
}
|
|
|
|
}
|
|
|
|
[Serializable]
|
|
public class ScatterNodePresenter : MaterialNodePresenter
|
|
{
|
|
protected override IEnumerable<GraphElementPresenter> GetControlData()
|
|
{
|
|
var instance = CreateInstance<ScatterContolPresenter>();
|
|
instance.Initialize(node);
|
|
return new List<GraphElementPresenter> { instance };
|
|
}
|
|
}
|
|
|
|
*/
|
|
}
|