Ejemplo n.º 1
0
 public CopyContext(GameObject objectToCopyFrom)
 {
     ObjectToCopyFrom  = objectToCopyFrom;
     ComponentProvider = new ComponentProvider();
     // EXAMPLE: If you want to disable copying an object's Transform component by default, uncomment the line below
     // ComponentProvider.AddFilteredComponentType<Transform>(); // This works for any type of component.
     RefreshComponents();
 }
Ejemplo n.º 2
0
 /// Refresh the components each time the ComponentProvider has changed.
 public void RefreshComponents()
 {
     Components = ComponentProvider.GetFilteredComponents(ObjectToCopyFrom);
 }