protected override void OnMessageDequeue(MessageEventArgs s) { DebugClient(" got :" + s.Data); var obj = JsonUtility.FromJson <WSFrameworkMessage>(s.Data); if (obj.type != "hierarchyResponse") { return; } var req = JsonUtility.FromJson <WSHierarchyResponse>(s.Data); // Debug.Log("req.root"+req.root); var response = new WSHierarchyResponse(); { // var allRoots=new } }
void SendResponse() { var stopwatch = new System.Diagnostics.Stopwatch(); stopwatch.Start(); var response = new WSHierarchyResponse(); var alltransforms = Resources.FindObjectsOfTypeAll <Transform>() as Transform[]; var transformList = new List <Transform>(); foreach (var t in alltransforms) { if (t.parent == null) { transformList.Add(t); } } stopwatch.Stop(); DebugService("found " + transformList.Count + " root transforms"); DebugService("Ellapses " + stopwatch.ElapsedMilliseconds + " ms /" + stopwatch.ElapsedTicks + "/ticks"); }