public static CreateGameObjectWithHideFlags ( string name, HideFlags flags ) : |
||
name | string | |
flags | HideFlags | |
Результат |
public static GameObject CreateGameObjectWithHideFlags(string name, HideFlags flags, params Type[] components)
{
GameObject obj2 = Internal_CreateGameObjectWithHideFlags(name, flags);
obj2.AddComponent(typeof(Transform));
foreach (Type type in components)
{
obj2.AddComponent(type);
}
return obj2;
}
protected static GameObject CreateLight() { GameObject lightGO = EditorUtility.CreateGameObjectWithHideFlags("PreRenderLight", HideFlags.HideAndDontSave, typeof(Light)); var light = lightGO.GetComponent <Light>(); light.type = LightType.Directional; light.intensity = 1.0f; light.enabled = false; return(lightGO); }