public override void Initialize() { base.Initialize(); property = SerializedPropertyUtility.CreateTemporaryProperty(accessor.definedType); propertyType = property.GetUnderlyingType(); var adaptiveWidthAttribute = propertyType.GetAttribute <InspectorFieldWidthAttribute>(); _adaptiveWidth = adaptiveWidthAttribute?.width ?? 200; }
private static TIndividual GetIndividualDrawer(SerializedProperty property) { var hash = SerializedPropertyUtility.GetPropertyHash(property); if (!individualDrawers.ContainsKey(hash)) { var individualDrawer = new TIndividual(); individualDrawer.Initialize(property); individualDrawers.Add(hash, individualDrawer); // Debug.LogFormat("Creating drawer for '{0}.{1}'.\n", property.serializedObject.targetObject.name, property.propertyPath); } return(individualDrawers[hash]); }
public override void Dispose() { SerializedPropertyUtility.DestroyTemporaryProperty(property); base.Dispose(); }