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