Exemplo n.º 1
0
 public static int GetTypeIndex(InstructionVariable variable)
 {
     if (variable.IsReference)
     {
         var index = VariableReferenceDrawer.GetLocationIndex(variable.Reference);
         return(index + _locationOffset);
     }
     else
     {
         return(VariableValueDrawer.GetTypeIndex(variable.Value));
     }
 }
Exemplo n.º 2
0
        public int GetTypeIndex(SerializedProperty property)
        {
            var isReferenceProperty = property.FindPropertyRelative("IsReference");

            if (isReferenceProperty.boolValue)
            {
                var referenceProperty = property.FindPropertyRelative("Reference");
                var index             = VariableReferenceDrawer.GetLocationIndex(referenceProperty);

                return(index + _locationOffset);
            }
            else
            {
                var valueProperty = property.FindPropertyRelative("Value");
                return(VariableValueDrawer.GetTypeIndex(valueProperty));
            }
        }