예제 #1
0
 public void Inject(NestedPrefabRootSerializingContext receiveList)
 {
     testParameter1   = int.Parse(receiveList.ValueFieldList [0]);
     testParameter2   = float.Parse(receiveList.ValueFieldList [1]);
     testObjectField1 = NestedPrefabContextInjectionHelper.CastToGameObject(receiveList.ObjectFieldList [0].objectTarget);
     testObjectField2 = NestedPrefabContextInjectionHelper.CastTo <Transform> (receiveList.ObjectFieldList [1].objectTarget);
 }
예제 #2
0
 public NestedPrefabRootSerializingContext GetExpectedDataAsContext()
 {
     //nullの時も正常に型判定をするため、GetSerializationInformationはここで利用する必要がある
     return(new NestedPrefabRootSerializingContext(this.gameObject,
                                                   NestedPrefabContextInjectionHelper.GetSerializationInformation(testParameter1),
                                                   NestedPrefabContextInjectionHelper.GetSerializationInformation(testParameter2),
                                                   NestedPrefabContextInjectionHelper.GetSerializationInformation(testObjectField1),
                                                   NestedPrefabContextInjectionHelper.GetSerializationInformation(testObjectField2)));
 }