void IGUIPacket.OnGUI(IUnityData unityData) { if (this.cachedLabel == null) { string[] paths = this.fieldPath.Split(NGServerScene.ValuePathSeparator); try { unityData.FetchReadablePaths(paths, true); if (this.deserializer == null) { this.cachedLabel = "Updating " + string.Join(" > ", paths) + '.'; } else { this.cachedLabel = "Updating " + string.Join(" > ", paths) + " (" + this.deserializer.Deserialize(new ByteBuffer(this.rawValue), null) + ")."; } } catch { if (this.deserializer == null) { this.cachedLabel = "Updating " + this.fieldPath + '.'; } else { this.cachedLabel = "Updating " + this.fieldPath + " (" + this.deserializer.Deserialize(new ByteBuffer(this.rawValue), null) + ")."; } } } GUILayout.Label(this.cachedLabel); }
public void LoadInspectableTypeStaticMembers(Client client, IUnityData unityData) { if (this.members == null) { client.AddPacket(new ClientRequestTypeStaticMembersPacket(this.typeIndex), this.OnTypeStaticMembersReceived(unityData)); } }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.cachedLabel == null) { StringBuilder buffer = Utility.GetBuffer("Requesting data from GameObject "); for (int i = 0; i < this.gameObjectInstanceIDs.Count; i++) { if (i > 0) { buffer.Append(", "); } buffer.Append('"'); buffer.Append(unityData.GetGameObjectName(this.gameObjectInstanceIDs[i])); buffer.Append('"'); if (Conf.DebugMode != Conf.DebugState.None) { buffer.Append(" (#"); buffer.Append(this.gameObjectInstanceIDs[i]); buffer.Append(')'); } } buffer.Append('.'); this.cachedLabel = Utility.ReturnBuffer(buffer); } GUILayout.Label(this.cachedLabel); }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.cachedLabel == null) { if (this.typeIndexes.Length > 0) { StringBuilder buffer = Utility.GetBuffer("Watching Type "); for (int i = 0; i < this.typeIndexes.Length; i++) { buffer.Append('"'); buffer.Append(unityData.GetTypeName(this.typeIndexes[i])); buffer.Append("\", "); } if (this.typeIndexes.Length > 0) { buffer.Length -= 2; } buffer.Append('.'); this.cachedLabel = Utility.ReturnBuffer(buffer); } else { this.cachedLabel = "Unwatching Type."; } } GUILayout.Label(this.cachedLabel); }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.cachedLabel == null) { this.cachedLabel = "Moving GameObject \"" + unityData.GetGameObjectName(this.instanceID) + "\" " + (Conf.DebugMode != Conf.DebugState.None ? " (#" + this.instanceID + ")" : "") + " into \"" + unityData.GetGameObjectName(this.instanceIDParent) + "\" " + (Conf.DebugMode != Conf.DebugState.None ? " (#" + this.instanceIDParent + ")" : "") + " at position \"" + this.siblingIndex + "\"."; } GUILayout.Label(this.cachedLabel); }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.cachedLabel == null) { this.cachedLabel = "Raycasting Camera \"" + unityData.GetResourceName(typeof(Camera), this.cameraID) + '"' + (Conf.DebugMode != Conf.DebugState.None ? " (#" + this.cameraID + ')' : string.Empty) + " at viewport (" + this.viewportX + " ; " + this.viewportY + ")."; } GUILayout.Label(this.cachedLabel); }
public static object SoapDeserialize(IUnityData data) { if (data == null || data.Size == 0) return null; using (var f = UnityDataFormatter.GetFormatter<System.Runtime.Serialization.Formatters.Soap.SoapFormatter>()) { return f.Deserialize(data); } }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.cachedLabel == null) { this.cachedLabel = "Moving ghost Camera (" + ((this.directions & (1 << 1)) != 0 ? "Forward " : "") + ((this.directions & (1 << 1)) != 0 ? "Backward " : "") + ((this.directions & (1 << 2)) != 0 ? "Left " : "") + ((this.directions & (1 << 3)) != 0 ? "Right " : "") + " x" + this.speed + ")."; } GUILayout.Label(this.cachedLabel); }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.cachedLabel == null) { this.cachedLabel = "Picking ghost Camera at the position of Camera \"" + unityData.GetResourceName(typeof(Camera), this.cameraID) + (Conf.DebugMode != Conf.DebugState.None ? "\" (#" + this.cameraID + ")." : "\"."); } GUILayout.Label(this.cachedLabel); }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.cachedLabel == null) { this.cachedLabel = "Setting active scene " + this.index + '.'; } GUILayout.Label(this.cachedLabel); }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.cachedLabel == null) { this.cachedLabel = "Sticking ghost Camera to \"" + (this.isGameObject == false ? unityData.GetResourceName(typeof(Transform), this.instanceID) : unityData.GetResourceName(typeof(GameObject), this.instanceID)) + (Conf.DebugMode != Conf.DebugState.None ? "\" (#" + this.instanceID + ")." : "\"."); } GUILayout.Label(this.cachedLabel); }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.cachedLabel == null) { this.cachedLabel = "Zooming ghost Camera (" + this.factor + ")."; } GUILayout.Label(this.cachedLabel); }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.cachedLabel == null) { this.cachedLabel = "Sending Texture2D \"" + this.name + "\" (" + raw.Length + " bytes)."; } GUILayout.Label(this.cachedLabel); }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.cachedLabel == null) { this.cachedLabel = "Requesting user assets of type \"" + this.type + "\"."; } GUILayout.Label(this.cachedLabel); }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.cachedLabel == null) { this.cachedLabel = "Requesting static members from class " + this.typeIndex + '.'; } GUILayout.Label(this.cachedLabel); }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.cachedLabel == null) { this.cachedLabel = "Resetting Camera settings on \"" + unityData.GetResourceName(typeof(Camera), this.cameraID) + '"' + (Conf.DebugMode != Conf.DebugState.None ? " (#" + this.cameraID + ")." : "."); } GUILayout.Label(this.cachedLabel); }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.cachedLabel == null) { this.cachedLabel = "Requesting " + this.type.Name + " \"" + unityData.GetResourceName(this.type, this.instanceID) + '"' + (Conf.DebugMode != Conf.DebugState.None ? " (#" + this.instanceID + ")." : "."); } GUILayout.Label(this.cachedLabel); }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.cachedLabel == null) { this.cachedLabel = "Setting ghost Camera " + this.setting + " (" + Enum.GetName(typeof(SettingType), this.type) + " " + this.value + ")."; } GUILayout.Label(this.cachedLabel); }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.cachedLabel == null) { this.cachedLabel = "Loading big array at \"" + this.arrayPath + "\"."; } GUILayout.Label(this.cachedLabel); }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.cachedLabel == null) { this.cachedLabel = "Rotating ghost Camera (" + this.rotation + ")."; } GUILayout.Label(this.cachedLabel); }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.cachedLabel == null) { this.cachedLabel = "Requesting data from Material \"" + unityData.GetResourceName(typeof(Material), this.materialInstanceID) + (Conf.DebugMode != Conf.DebugState.None ? "\" (#" + this.materialInstanceID + ")." : "\"."); } GUILayout.Label(this.cachedLabel); }
public ClientScene(NetScene scene, IUnityData unityData) { this.buildIndex = scene.buildIndex; this.name = scene.name; for (int i = 0; i < scene.roots.Length; i++) { this.roots.Add(new ClientGameObject(this, null, scene.roots[i], unityData)); } }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.useCompression == true) { GUILayout.Label("Enabling Camera compression."); } else { GUILayout.Label("Disabling Camera compression."); } }
public ClientStaticMember(int typeIndex, NetField netField, bool isEditable, IUnityData unityData) { this.declaringTypeIndex = typeIndex; this.fieldType = netField.fieldType; this.name = netField.name; this.value = netField.value; this.isEditable = isEditable; this.drawer = TypeHandlerDrawersManager.CreateTypeHandlerDrawer(netField.handler, this.fieldType); this.dataDrawer = new DataDrawer(unityData); }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.useJPG == true) { GUILayout.Label("Selecting Camera JPG format."); } else { GUILayout.Label("Selecting Camera PNG format."); } }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.cachedLabel == null) { this.cachedLabel = string.Format("Updating Material {0}.{1}{2}.", unityData.GetResourceName(typeof(Material), this.instanceID), this.propertyName, (Conf.DebugMode != Conf.DebugState.None ? " (#" + this.instanceID + ")" : string.Empty)); } GUILayout.Label(this.cachedLabel); }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.cachedLabel == null) { this.cachedLabel = string.Format("Adding Component \"{0}\" to {1}{2}.", this.componentType, unityData.GetResourceName(typeof(GameObject), this.gameObjectInstanceID), (Conf.DebugMode != Conf.DebugState.None ? " (#" + this.gameObjectInstanceID + ")" : string.Empty)); } GUILayout.Label(this.cachedLabel); }
protected bool AsyncUpdateCommand(IUnityData unityData, string valuePath, object value, Type type, TypeHandler customTypeHandler) { return(unityData.AddPacket(new ClientUpdateFieldValuePacket(valuePath, customTypeHandler.Serialize(type, value), customTypeHandler), p => { if (p.CheckPacketStatus() == true) { ServerUpdateFieldValuePacket packet = p as ServerUpdateFieldValuePacket; unityData.UpdateFieldValue(packet.fieldPath, packet.rawValue); } })); }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.cachedGUI == null) { this.cachedGUI = string.Format("Changing Material \"{0}\"{1} with Shader \"{2}\"{3}.", unityData.GetResourceName(typeof(Material), this.instanceID), (Conf.DebugMode != Conf.DebugState.None ? " (#" + this.instanceID + ")" : string.Empty), unityData.GetResourceName(typeof(Shader), this.shaderInstanceID), (Conf.DebugMode != Conf.DebugState.None ? " (#" + this.shaderInstanceID + ")" : string.Empty)); } GUILayout.Label(this.cachedGUI); }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.cachedLabel == null) { this.cachedLabel = string.Format("Invoking {0}{1}.{2}{3}.{4}", unityData.GetGameObjectName(this.gameObjectInstanceID), (Conf.DebugMode != Conf.DebugState.None ? " (#" + this.gameObjectInstanceID + ')' : string.Empty), unityData.GetBehaviourName(this.gameObjectInstanceID, this.componentInstanceID), (Conf.DebugMode != Conf.DebugState.None ? " (#" + this.componentInstanceID + ')' : string.Empty), this.methodSignature); } GUILayout.Label(this.cachedLabel); }
void IGUIPacket.OnGUI(IUnityData unityData) { if (this.cachedLabel == null) { if (this.forceRefresh == true) { this.cachedLabel = "Force requesting resources of type \"" + this.type.Name + "\"."; } else { this.cachedLabel = "Requesting resources of type \"" + this.type.Name + "\"."; } } GUILayout.Label(this.cachedLabel); }
public static void SoapSerialize(IUnityData data, object obj) { if (data == null) throw new System.ArgumentNullException("data"); if (obj != null) { using (var f = UnityDataFormatter.GetFormatter<System.Runtime.Serialization.Formatters.Soap.SoapFormatter>()) { f.Serialize(data, obj); } } else { data.Clear(); } }