Example #1
0
 protected override void InstantiateDeprecated()
 {
     dTypes = new DeprecatedType <string>[] {
         new DeprecatedType <string>(
             typeof(Text),                                               //Type
             (t => (t as Text).text),                                    //Getter
             ((u, val) => {                                              //Setter
             (u as Text).text = val;
         })),
         new DeprecatedType <string>(
             typeof(TMPro.TextMeshProUGUI),                      //Type
             (t => (t as Text).text),                            //Getter
             ((u, val) => {                                      //Setter
             (u as Text).text = val;
         })),
     };
 }
 //Deprecated Types
 protected override void InstantiateDeprecated()
 {
     //UnityWebRequest.EscapeURL(child.gameObject.GetComponent<InputField>().text);
     dTypes = new DeprecatedType <string>[] {
         new DeprecatedType <string>(
             //Type
             typeof(InputField),
             //Getter
             (t => {
             return((t as InputField).text);
         }),
             //Setter
             ((u, val) => {
             (u as InputField).text = val;
             (u as InputField).onEndEdit.Invoke(val);
         }))
     };
 }
 protected override void InstantiateDeprecated()
 {
     //TODO CHECK FOR ERROR WITH CAPTION TEXT NOT BEING INITIATED
     dTypes = new DeprecatedType <string>[] {
         new DeprecatedType <string>(
             typeof(Dropdown),                                                   //Type
             (t => (t as Dropdown).captionText.text),                            //Getter
             ((u, val) => {                                                      //Setter
             int indexValue = 0;
             foreach (Dropdown.OptionData myOptionData in (u as Dropdown).options)
             {
                 if (myOptionData.text.Equals(val))
                 {
                     break;
                 }
                 indexValue++;
             }
             (u as Dropdown).value = indexValue;
         }))
     };
 }