public static Sensor CreateFromTransfer(SensorTransfer st) { GameObject go = Instantiate(PrefabManager.instance.SensorPrefab) as GameObject; Sensor s = go.GetComponent <Sensor> (); s.ImportTransfer(st); return(s); }
void ImportTransfer(SensorTransfer st) { id = st.id; uid = st.uid; x = st.x; y = st.y; rotation = st.rotation; transX = st.transX; transY = st.transY; scaleX = st.scaleX; scaleY = st.scaleY; flipX = st.flipX; flipY = st.flipY; origin = st.origin; containerType = st.containerType; containerId = st.containerId; typeId = st.typeId; typeName = st.typeName; typeGroupName = st.typeGroupName; typeOrigin = st.typeOrigin; attributes = st.attributes; }