Esempio n. 1
0
        public void ShowGUI()
        {
            CustomGUILayout.MultiLineLabelGUI("Scene number:", sceneNumber.ToString());
            CustomGUILayout.MultiLineLabelGUI("Active NavMesh:", navMesh.ToString());
            CustomGUILayout.MultiLineLabelGUI("Default PlayerStart:", playerStart.ToString());
            CustomGUILayout.MultiLineLabelGUI("Default SortingMap:", sortingMap.ToString());
            CustomGUILayout.MultiLineLabelGUI("Default TintMap:", tintMap.ToString());
            CustomGUILayout.MultiLineLabelGUI("OnStart cutscene:", onStartCutscene.ToString());
            CustomGUILayout.MultiLineLabelGUI("OnLoadCutscene:", onLoadCutscene.ToString());

            EditorGUILayout.LabelField("Remember data:");
            if (allScriptData != null && allScriptData.Count > 0)
            {
                foreach (ScriptData scriptData in allScriptData)
                {
                    RememberData rememberData = SaveSystem.FileFormatHandler.DeserializeObject <RememberData> (scriptData.data);
                    if (rememberData != null)
                    {
                        CustomGUILayout.MultiLineLabelGUI("   " + rememberData.GetType().ToString() + ":", EditorJsonUtility.ToJson(rememberData, true));
                    }
                }
            }

            if (allTransformData != null && allTransformData.Count > 0)
            {
                foreach (TransformData transformData in allTransformData)
                {
                    CustomGUILayout.MultiLineLabelGUI("   " + transformData.GetType().ToString() + ":", EditorJsonUtility.ToJson(transformData, true));
                }
            }

            CustomGUILayout.MultiLineLabelGUI("Active ActionLists:", activeLists.ToString());
            CustomGUILayout.MultiLineLabelGUI("Local Variables:", localVariablesData);
        }
Esempio n. 2
0
        public void ShowGUI()
        {
            try
            {
                CustomGUILayout.MultiLineLabelGUI("Player ID:", playerID.ToString());

                EditorGUILayout.LabelField("Scene info:");
                CustomGUILayout.MultiLineLabelGUI("   Current scene:", currentScene.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Previous scene:", previousScene.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Sub-scenes:", openSubScenes);
                if (tempPlayerStart != 0)
                {
                    CustomGUILayout.MultiLineLabelGUI("   PlayerStart ID:", tempPlayerStart.ToString());
                    CustomGUILayout.MultiLineLabelGUI("   PlayerStart method:", tempTeleportPlayerStartMethod.ToString());
                }

                EditorGUILayout.LabelField("Movement:");
                CustomGUILayout.MultiLineLabelGUI("   Position:", "(" + playerLocX.ToString() + ", " + playerLocY.ToString() + ", " + playerLocZ.ToString() + ")");
                CustomGUILayout.MultiLineLabelGUI("   Rotation:", playerRotY.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Walk speed:", playerWalkSpeed.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Run speed:", playerRunSpeed.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Is running?", playerIsRunning.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Up locked?", playerUpLock.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Down locked?", playerDownLock.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Left locked?", playerLeftlock.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Right locked?", playerRightLock.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Run locked?", playerRunLock.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Free-aim locked?", playerFreeAimLock.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Ignore gravity?", playerIgnoreGravity.ToString());

                EditorGUILayout.LabelField("Animation:");
                CustomGUILayout.MultiLineLabelGUI("   Idle animation:", playerIdleAnim);
                CustomGUILayout.MultiLineLabelGUI("   Walk animation:", playerWalkAnim);
                CustomGUILayout.MultiLineLabelGUI("   Talk animation:", playerTalkAnim);
                CustomGUILayout.MultiLineLabelGUI("   Run animation:", playerRunAnim);
                CustomGUILayout.MultiLineLabelGUI("   In custom state?", inCustomCharState.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Left hand IK:", leftHandIKState);
                CustomGUILayout.MultiLineLabelGUI("   Right hand IK:", rightHandIKState);

                EditorGUILayout.LabelField("Sound:");
                CustomGUILayout.MultiLineLabelGUI("   Walk sound:", playerWalkSound);
                CustomGUILayout.MultiLineLabelGUI("   Run sound:", playerRunSound);

                EditorGUILayout.LabelField("Speech:");
                CustomGUILayout.MultiLineLabelGUI("   Portrait graphic:", playerPortraitGraphic);
                CustomGUILayout.MultiLineLabelGUI("   Speech label:", playerSpeechLabel);
                CustomGUILayout.MultiLineLabelGUI("   Speech label ID:", playerDisplayLineID.ToString());

                EditorGUILayout.LabelField("Pathfinding:");
                CustomGUILayout.MultiLineLabelGUI("   Target node:", playerTargetNode.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Previous node:", playerPrevNode.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Path data:", playerPathData);
                CustomGUILayout.MultiLineLabelGUI("   Locked to path?", playerLockedPath.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Active path:", playerActivePath.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Path affects Y?", playerPathAffectY.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Last target node:", lastPlayerTargetNode.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Last previous node:", lastPlayerPrevNode.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Last active path:", lastPlayerActivePath.ToString());

                EditorGUILayout.LabelField("Sprites:");
                CustomGUILayout.MultiLineLabelGUI("   Lock direction?", playerLockDirection.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Sprite direction:", playerSpriteDirection);
                CustomGUILayout.MultiLineLabelGUI("   Scale locked?", playerLockScale.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Sprite scale:", playerSpriteScale.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Lock sorting?", playerLockSorting.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Sorting order:", playerSortingOrder.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Sorting layer:", playerSortingLayer);
                CustomGUILayout.MultiLineLabelGUI("   Follow default Sorting Map?", followSortingMap.ToString());
                if (!followSortingMap)
                {
                    CustomGUILayout.MultiLineLabelGUI("   Sorting map?", customSortingMapID.ToString());
                }

                CustomGUILayout.MultiLineLabelGUI("Inventory:", inventoryData);
                CustomGUILayout.MultiLineLabelGUI("   Active Document:", activeDocumentID.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Collected Documents:", collectedDocumentData.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Last-open Document pages", lastOpenDocumentPagesData.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Objectives:", playerObjectivesData.ToString());

                EditorGUILayout.LabelField("Head-turning:");
                CustomGUILayout.MultiLineLabelGUI("   Head facing Hotspot?", playerLockHotspotHeadTurning.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Head turning?", isHeadTurning.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Head target:", headTargetID.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Head target position:", "(" + headTargetX + ", " + headTargetY + ", " + headTargetZ + ")");

                EditorGUILayout.LabelField("Camera:");
                CustomGUILayout.MultiLineLabelGUI("   Camera:", gameCamera.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Last nav cam:", lastNavCamera.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Last nav cam 2:", lastNavCamera2.ToString());
                CustomGUILayout.MultiLineLabelGUI("   Camera position:", "(" + mainCameraLocX + ", " + mainCameraLocY + ", " + mainCameraLocZ + ")");
                CustomGUILayout.MultiLineLabelGUI("   Camera rotation:", "(" + mainCameraRotX + ", " + mainCameraRotY + ", " + mainCameraRotZ + ")");
                CustomGUILayout.MultiLineLabelGUI("   Split-screen?", isSplitScreen.ToString());
                if (isSplitScreen)
                {
                    CustomGUILayout.MultiLineLabelGUI("   Top-left split?", isTopLeftSplit.ToString());
                    CustomGUILayout.MultiLineLabelGUI("   Vertical split?", splitIsVertical.ToString());
                    CustomGUILayout.MultiLineLabelGUI("   Split camera:", splitCameraID.ToString());
                    CustomGUILayout.MultiLineLabelGUI("   Split amount main:", splitAmountMain.ToString());
                    CustomGUILayout.MultiLineLabelGUI("   Split amount other:", splitAmountOther.ToString());
                    CustomGUILayout.MultiLineLabelGUI("   Overlay rect:", "(" + overlayRectX + ", " + overlayRectY + ", " + overlayRectWidth + ", " + overlayRectHeight + ")");
                }
                CustomGUILayout.MultiLineLabelGUI("   Shake intensity:", shakeIntensity.ToString());
                if (shakeIntensity > 0f)
                {
                    CustomGUILayout.MultiLineLabelGUI("   Shake duration", shakeDuration.ToString());
                    CustomGUILayout.MultiLineLabelGUI("   Shake effect:", ((CameraShakeEffect)shakeEffect).ToString());
                }

                if (playerScriptData != null && playerScriptData.Count > 0)
                {
                    EditorGUILayout.LabelField("Remember data:");
                    foreach (ScriptData scriptData in playerScriptData)
                    {
                        RememberData rememberData = SaveSystem.FileFormatHandler.DeserializeObject <RememberData> (scriptData.data);
                        if (rememberData != null)
                        {
                            CustomGUILayout.MultiLineLabelGUI("   " + rememberData.GetType().ToString() + ":", EditorJsonUtility.ToJson(rememberData, true));
                        }
                    }
                }
            }
            catch (Exception e)
            {
                ACDebug.LogWarning("Error displaying player data. Exception: " + e);
            }
        }