本文整理汇总了C#中PropertyList.SetCount方法的典型用法代码示例。如果您正苦于以下问题:C# PropertyList.SetCount方法的具体用法?C# PropertyList.SetCount怎么用?C# PropertyList.SetCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PropertyList
的用法示例。
在下文中一共展示了PropertyList.SetCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Init
private void Init()
{
this.listFields = new List<IListField>();
#region "List Inits"
this.listFields.Add(new BoundsList("Bounds list"));
this.listFields.Add(new ColorList("Color List"));
this.listFields.Add(new CurveList("Curve List"));
this.listFields.Add(new DelayedFloatList("Delayed Float List"));
this.listFields.Add(new DelayedIntList("Delayed Int List"));
this.listFields.Add(new DelayedTextList("Delayed Text List"));
this.listFields.Add(new DoubleList("Double List"));
this.listFields.Add(new FloatList("Float List"));
this.listFields.Add(new IntList("Int List"));
this.listFields.Add(new LayerList("Layer List"));
this.listFields.Add(new MaskList("Mask List"));
this.listFields.Add(new ObjectList<GameObject>("GameObject List"));
this.listFields.Add(new PasswordList("Password List"));
this.listFields.Add(new RectList("Rect List"));
this.listFields.Add(new TagList("Tag List"));
this.listFields.Add(new TextList("Text List"));
this.listFields.Add(new Vector2List("Vector2 List"));
this.listFields.Add(new Vector3List("Vector3 List"));
this.listFields.Add(new Vector4List("Vector4 List"));
var label = new LabelList("Label List", new List<KeyValuePair<string, string>>() {
new KeyValuePair<string, string>("Key1", "Value1"),
new KeyValuePair<string, string>("Key2", "Value2")
}) {
ShowCountField = false
};
label.SetCount(2);
this.listFields.Add(label);
ExampleObj example = null;
var select = Selection.activeGameObject;
if(select != null && (example = select.GetComponent<ExampleObj>()) != null) {
this.serialized = new SerializedObject(example);
var property = new PropertyList("Property List", true, new List<SerializedProperty>() {
this.serialized.FindProperty("Vec3"),
this.serialized.FindProperty("Str"),
this.serialized.FindProperty("List")
}) {
ShowCountField = false
};
property.SetCount(3);
this.listFields.Add(property);
}
#endregion
}