Console Fix
Console now properly trims non alphanumeric characters from arguments before running the command spawn command is working
This commit is contained in:
parent
cfdacd10cf
commit
e9b32dec0b
5 changed files with 80 additions and 37 deletions
|
|
@ -13,10 +13,20 @@ using static Unity.Mathematics.math;
|
|||
|
||||
public static class UnityExtensions
|
||||
{
|
||||
public static void BroadcastAll(string fun, System.Object msg) {
|
||||
GameObject[] gos = (GameObject[])GameObject.FindObjectsOfType(typeof(GameObject));
|
||||
foreach (GameObject go in gos) {
|
||||
if (go && go.transform.parent == null) {
|
||||
go.gameObject.BroadcastMessageExt<MonoBehaviour>(fun, msg, SendMessageOptions.DontRequireReceiver);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void BroadcastMessageExt<T>(this GameObject go, string methodName, object value = null, SendMessageOptions options = SendMessageOptions.RequireReceiver)
|
||||
{
|
||||
var monoList = new List<T>();
|
||||
go.GetComponentsInChildren(true, monoList);
|
||||
//monoList.Add();
|
||||
foreach (var component in monoList)
|
||||
{
|
||||
try
|
||||
|
|
|
|||
Loading…
Reference in a new issue