public void Init(PointerMono _pointer) { pointer = _pointer; transform.parent = pointer.transform; transform.localScale *= 0.5f; //will call subclass ie.property init Init(); pointerLinker = LinkRenderer.AddLinkRenderer(this, LinkerType.Pointer); Deserialize(); }
public void Init(ScriptableMethod _scriptableMethod, PointerMono _pointer) { parameters = new List <ValueMono> (); scriptableMethod = _scriptableMethod; dataType = scriptableMethod.returnType.children.First().name; getCallbackName = scriptableMethod.name; parameterLinker = LinkRenderer.AddLinkRenderer(this, LinkerType.Parameter); base.Init(_pointer); name += " " + getCallbackName; }
public void Init(PropertyInfo _property, PointerMono _pointer) { if (_property.PropertyType != this.GetType().GetProperty("data").PropertyType) { Debug.LogError("type mismatch! i was expecting " + _property.PropertyType + " and got " + this.GetType().GetProperty("data").PropertyType.ToString()); } getCallbackName = (_property.CanRead) ? _property.GetGetMethod().Name : ""; setCallbackName = (_property.CanWrite) ? _property.GetSetMethod().Name : ""; dataType = _property.PropertyType.AssemblyQualifiedName; Init(_pointer); name += " " + _property.Name; }
public override void Deserialize() { base.Deserialize(); pointer = GetComponentInParent <PointerMono> (); //only null pointer on the first OnEnable deserialize for standalone objects if (pointer == null) { return; } if (pointer is StaticPointer && pointer.GetBoxedData() == null) { pointer.Deserialize(); } }
//for standalone values only public void StandaloneInit(PointerMono _pointer) { Init(this.GetType().GetProperty("dataProperty"), _pointer); }