/// <summary> /// Constructor /// </summary> /// <param name="moduleName">Name of the module this runtime is assigned to</param> public UIExtenderRuntime(string moduleName) { ModuleName = moduleName; PrefabComponent = new PrefabComponent(moduleName); ViewModelComponent = new ViewModelComponent(moduleName); }
/// <summary> /// Constructor /// </summary> /// <param name="moduleName">Name of the module this runtime is assigned to</param> internal UIExtenderRuntime(string moduleName) { ModuleName = moduleName; PrefabComponent = new PrefabComponent(moduleName); ViewModelComponent = new ViewModelComponent(moduleName); CodePatcher = new CodePatcherComponent(this); }
public BindingEntry( int index, ViewModelComponent component, string propertyName, Type observableType, Type argumentType, bool needsToBeBoxed) { Index = index; Component = component; PropertyName = propertyName; ObservableType = observableType; ArgumentType = argumentType; NeedsToBeBoxed = needsToBeBoxed; }
private static string GenerateBindingId(ViewModelComponent component, string propertyName) { return($"{component.gameObject.name}.{component.Id}/{propertyName}"); }
private static void SetViewModelContainer(SerializedProperty bindingInfoProperty, ViewModelComponent value) { bindingInfoProperty.FindPropertyRelative(ViewModelContainerId).objectReferenceValue = value; }
private static void SetBinding(SerializedProperty property, ViewModelComponent viewModelComponent, string propertyName) { SetViewModelContainer(property, viewModelComponent); SetPropertyName(property, propertyName); }