Tanoda
pb_ReflectedValue.cs
Go to the documentation of this file.
1// using System.Reflection;
2// using UnityEngine;
3
4// namespace GILES
5// {
6// /**
7// * An object representing either a property or field reflected from an object. Essentially a union { PropertyInfo, FieldInfo }
8// * with get/set for both depending on the enclosed type, with a strong type.
9// */
10// public class pb_ReflectedInfo
11// {
12// public PropertyInfo property;
13// public FieldInfo field;
14
15// public pb_ReflectedValue(PropertyInfo property)
16// {
17// this.propertyInfo = property;
18// this.fieldInfo = null;
19// }
20
21// public pb_ReflectedValue(FieldInfo field)
22// {
23// this.propertyInfo = null;
24// this.fieldInfo = field;
25// }
26
27// public object GetValue()
28// {
29// if(property != null)
30// return property.GetValue(target, null);
31// else
32// return field.GetValue(target);
33// }
34
35// public void SetValue(object value)
36// {
37// }
38// }
39// }