Ejemplo n.º 1
0
        public static void RenderLongProperty(VisualElement container, string name, object value, Action <object> setter)
        {
            var field = new LongField(name);

            field.SetValueWithoutNotify((long)value);
            field.MarkDirtyRepaint();
            field.RegisterValueChangedCallback(evt => setter(evt.newValue));
            container.Add(field);
        }
Ejemplo n.º 2
0
    public override void Update()
    {
        _isCreatedField.SetValueWithoutNotify(Target.Collider.IsCreated);

        unsafe
        {
            long address = (long)Target.Collider.GetUnsafePtr();
            _addressField.SetValueWithoutNotify(address);
        }

        if (Target.Collider.IsCreated)
        {
            _radiusField.SetValueWithoutNotify(Target.Collider.Value.Radius);
            _typeField.SetValueWithoutNotify(Target.Collider.Value.ColliderType);
        }
    }