Beispiel #1
0
        /// <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);
        }
Beispiel #2
0
        /// <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);
        }
Beispiel #3
0
 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;
 }
Beispiel #4
0
 private static string GenerateBindingId(ViewModelComponent component, string propertyName)
 {
     return($"{component.gameObject.name}.{component.Id}/{propertyName}");
 }
Beispiel #5
0
 private static void SetViewModelContainer(SerializedProperty bindingInfoProperty, ViewModelComponent value)
 {
     bindingInfoProperty.FindPropertyRelative(ViewModelContainerId).objectReferenceValue = value;
 }
Beispiel #6
0
 private static void SetBinding(SerializedProperty property, ViewModelComponent viewModelComponent, string propertyName)
 {
     SetViewModelContainer(property, viewModelComponent);
     SetPropertyName(property, propertyName);
 }