Unity 6.3
0 онлайн 40 гостей 3 в системе
Вход

SerializedProperty.entityIdValue

Declaration

public EntityId entityIdValue;

Описание

Значение свойства EntityId.

Содержит допустимое значение, когда propertyType является SerializedPropertyType.EntityId.

Дополнительные ресурсы: intValue, uintValue, longValue, propertyType, SerializedPropertyType.Integer.

using System;
using UnityEditor;
using UnityEngine;

public class EntityIdTypeExample : ScriptableObject { public EntityId m_EntityId = EntityId.None;

[MenuItem("Example/SerializedProperty EntityId Access APIs")] static void TestMethod() { // This example demonstrates how to access an EntityId via SerializedProperty

EntityIdTypeExample obj = ScriptableObject.CreateInstance<EntityIdTypeExample>(); SerializedObject sObj = new SerializedObject(obj);

Debug.Log($"m_EntityId : {sObj.FindProperty("m_EntityId").entityIdValue}"); } }