예제 #1
0
 /// <summary>
 /// Creates a new component on a new GameObject
 /// </summary>
 /// <param name="binder">The preceding binder base.</param>
 /// <param name="name">The name of the GameObject.</param>
 /// <returns></returns>
 public static ConditionCopyNonLazyBinder FromNewComponentOnNewGameObject(this FactoryFromBinderBase binder, string name = "GameObject")
 {
     if (name == nameof(GameObject))
     {
         name = binder.BindInfo.ToTypes.FirstOrDefault()?.Name ?? nameof(GameObject);
     }
     return(binder.FromNewComponentOn(new GameObject(name)));
 }
예제 #2
0
 /// <summary>
 /// Creates a new component on a new GameObject
 /// </summary>
 /// <param name="binder">The preceding binder base.</param>
 /// <param name="name">The name of the GameObject.</param>
 /// <returns></returns>
 public static ConditionCopyNonLazyBinder FromNewComponentOnNewGameObject(this FactoryFromBinderBase binder, string name = "GameObject")
 {
     return(binder.FromNewComponentOn(new GameObject(name)));
 }