Skip to content

Commit

Permalink
feat: adding buttons that create gameobject with NetworkIdentity
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Frowen committed Feb 2, 2023
1 parent bb8d0da commit 0115818
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Assets/Mirage/Editor/NetworkMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,20 @@ public static GameObject CreateNetworkManager()
nsm.Server = networkServer;
return go;
}

/// <summary>
/// Creates a new game object with NetworkManager and other network components attached, Including UdpSocketFactory
/// </summary>
/// <returns></returns>
[MenuItem("GameObject/Network/NetworkIdentity", priority = 7)]
public static GameObject CreateNetworkIdentity()
{
var components = new Type[]
{
typeof(NetworkIdentity),
};
var go = new GameObject("NetworkIdentity", components);
return go;
}
}
}

0 comments on commit 0115818

Please sign in to comment.