plantilla base para movimiento básico
This commit is contained in:
Robii Aragon
2026-02-05 05:07:55 -08:00
parent 195b696771
commit 779f2c8b20
14443 changed files with 23840465 additions and 452 deletions

View File

@@ -0,0 +1,40 @@
using UnityEngine;
using System.Collections;
#if UNITY_EDITOR
using UnityEditor;
[CustomEditor (typeof(AIPatrolSystem))]
public class AIPatrolSystemEditor : Editor
{
AIPatrolSystem manager;
void OnEnable ()
{
manager = (AIPatrolSystem)target;
}
public override void OnInspectorGUI ()
{
DrawDefaultInspector ();
EditorGUILayout.Space ();
GUILayout.Label ("EDITOR BUTTONS", EditorStyles.boldLabel);
EditorGUILayout.Space ();
if (GUILayout.Button ("Pause Patrol On AI")) {
manager.pausePatrolStateOnAI ();
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Resume Patrol On AI")) {
manager.resumePatrolStateOnAI ();
}
EditorGUILayout.Space ();
}
}
#endif

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 8d981038677bfe7409781fde1eb9bc62
timeCreated: 1580627474
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/AIPatrolSystemEditor.cs
uploadId: 814740

View File

@@ -0,0 +1,44 @@
using UnityEngine;
using System.Collections;
#if UNITY_EDITOR
using UnityEditor;
[CustomEditor (typeof(AIWalkToPosition))]
public class AIWalkToPositionEditor : Editor
{
AIWalkToPosition manager;
void OnEnable ()
{
manager = (AIWalkToPosition)target;
}
public override void OnInspectorGUI ()
{
DrawDefaultInspector ();
EditorGUILayout.Space ();
GUILayout.Label ("EDITOR BUTTONS", EditorStyles.boldLabel);
EditorGUILayout.Space ();
if (GUILayout.Button ("Activate Walk To Position")) {
if (Application.isPlaying) {
manager.activateWalkToPosition ();
}
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Stop Walk To Position")) {
if (Application.isPlaying) {
manager.stopActivateWalkPosition ();
}
}
EditorGUILayout.Space ();
}
}
#endif

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: e7f4e1d7ee99f404eab198a134dcb27c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/AIWalkToPositionEditor.cs
uploadId: 814740

View File

@@ -0,0 +1,341 @@
using UnityEngine;
using System.Collections;
#if UNITY_EDITOR
using UnityEditor;
[CustomEditor (typeof(AIWayPointPatrol))]
public class AIWayPointPatrolEditor : Editor
{
SerializedProperty waitTimeBetweenPoints;
SerializedProperty layerMask;
SerializedProperty newWaypointOffset;
SerializedProperty surfaceAdjusmentOffset;
SerializedProperty showGizmo;
SerializedProperty gizmoLabelColor;
SerializedProperty gizmoRadius;
SerializedProperty useHandleForVertex;
SerializedProperty handleRadius;
SerializedProperty handleGizmoColor;
SerializedProperty patrolList;
SerializedProperty useFreeHandle;
AIWayPointPatrol patrol;
bool expanded;
GUIStyle style = new GUIStyle ();
Quaternion currentRotationHandle;
Vector3 curretPositionHandle;
GUIStyle buttonStyle = new GUIStyle ();
void OnEnable ()
{
waitTimeBetweenPoints = serializedObject.FindProperty ("waitTimeBetweenPoints");
layerMask = serializedObject.FindProperty ("layerMask");
newWaypointOffset = serializedObject.FindProperty ("newWaypointOffset");
surfaceAdjusmentOffset = serializedObject.FindProperty ("surfaceAdjusmentOffset");
showGizmo = serializedObject.FindProperty ("showGizmo");
gizmoLabelColor = serializedObject.FindProperty ("gizmoLabelColor");
gizmoRadius = serializedObject.FindProperty ("gizmoRadius");
useHandleForVertex = serializedObject.FindProperty ("useHandleForVertex");
handleRadius = serializedObject.FindProperty ("handleRadius");
handleGizmoColor = serializedObject.FindProperty ("handleGizmoColor");
patrolList = serializedObject.FindProperty ("patrolList");
useFreeHandle = serializedObject.FindProperty ("useFreeHandle");
patrol = (AIWayPointPatrol)target;
}
void OnSceneGUI ()
{
if (patrol.showGizmo) {
style.normal.textColor = patrol.gizmoLabelColor;
style.alignment = TextAnchor.MiddleCenter;
for (int i = 0; i < patrol.patrolList.Count; i++) {
if (patrol.patrolList [i].patrolTransform != null) {
Handles.Label (patrol.patrolList [i].patrolTransform.position, ("Patrol " + (i + 1)), style);
}
for (int j = 0; j < patrol.patrolList [i].wayPoints.Count; j++) {
if (patrol.patrolList [i].wayPoints [j] != null) {
Handles.Label (patrol.patrolList [i].wayPoints [j].position, (j + 1).ToString (), style);
if (patrol.useHandleForVertex) {
Handles.color = patrol.handleGizmoColor;
EditorGUI.BeginChangeCheck ();
Vector3 oldPoint = patrol.patrolList [i].wayPoints [j].position;
var fmh_76_61_638979118401555415 = Quaternion.identity; Vector3 newPoint = Handles.FreeMoveHandle (oldPoint, patrol.handleRadius, new Vector3 (.25f, .25f, .25f), Handles.CircleHandleCap);
if (EditorGUI.EndChangeCheck ()) {
Undo.RecordObject (patrol.patrolList [i].wayPoints [j], "move Patrol Point Handle");
patrol.patrolList [i].wayPoints [j].position = newPoint;
}
}
if (patrol.useFreeHandle) {
Handles.color = patrol.handleGizmoColor;
showPositionHandle (patrol.patrolList [i].wayPoints [j], "move AI Waypoint handle" + i);
}
}
}
if (patrol.useHandleForVertex) {
Handles.color = patrol.handleGizmoColor;
EditorGUI.BeginChangeCheck ();
Vector3 oldPoint = patrol.patrolList [i].patrolTransform.position;
var fmh_97_59_638979118401557535 = Quaternion.identity; Vector3 newPoint = Handles.FreeMoveHandle (oldPoint, patrol.handleRadius, new Vector3 (.25f, .25f, .25f), Handles.CircleHandleCap);
if (EditorGUI.EndChangeCheck ()) {
Undo.RecordObject (patrol.patrolList [i].patrolTransform, "move Patrol Parent Handle");
patrol.patrolList [i].patrolTransform.position = newPoint;
}
}
if (patrol.useFreeHandle) {
Handles.color = patrol.handleGizmoColor;
showPositionHandle (patrol.patrolList [i].patrolTransform, "move Patrol Parent Handle");
}
}
}
}
public override void OnInspectorGUI ()
{
GUILayout.BeginVertical (GUILayout.Height (30));
EditorGUILayout.Space ();
buttonStyle = new GUIStyle (GUI.skin.button);
buttonStyle.fontStyle = FontStyle.Bold;
buttonStyle.fontSize = 12;
GUILayout.BeginVertical ("Main Settings", "window");
EditorGUILayout.PropertyField (waitTimeBetweenPoints);
EditorGUILayout.PropertyField (layerMask);
EditorGUILayout.PropertyField (newWaypointOffset);
EditorGUILayout.PropertyField (surfaceAdjusmentOffset);
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Gizmo Options", "window");
EditorGUILayout.PropertyField (showGizmo);
if (showGizmo.boolValue) {
EditorGUILayout.PropertyField (gizmoLabelColor);
EditorGUILayout.PropertyField (gizmoRadius);
EditorGUILayout.PropertyField (useHandleForVertex);
EditorGUILayout.PropertyField (useFreeHandle);
if (useHandleForVertex.boolValue || useFreeHandle.boolValue) {
EditorGUILayout.PropertyField (handleRadius);
EditorGUILayout.PropertyField (handleGizmoColor);
}
}
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Patrol List", "window");
showPatrolList (patrolList);
GUILayout.EndVertical ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Adjust To Surface")) {
patrol.adjustWayPoints ();
}
// if (GUILayout.Button ("Invert Path")) {
// patrol.invertPath ();
// }
GUILayout.EndVertical ();
EditorGUILayout.Space ();
if (GUI.changed) {
serializedObject.ApplyModifiedProperties ();
}
}
void showPatrolInfo (SerializedProperty list, int index)
{
GUILayout.BeginVertical ("box");
EditorGUILayout.PropertyField (list.FindPropertyRelative ("name"));
EditorGUILayout.PropertyField (list.FindPropertyRelative ("patrolTransform"));
GUILayout.BeginVertical ("WayPoint List", "window");
showWayPointList (list.FindPropertyRelative ("wayPoints"), index);
GUILayout.EndVertical ();
GUILayout.EndVertical ();
}
void showWayPointList (SerializedProperty list, int index)
{
EditorGUILayout.Space ();
if (GUILayout.Button ("Show/Hide " + list.displayName, buttonStyle)) {
list.isExpanded = !list.isExpanded;
}
EditorGUILayout.Space ();
if (list.isExpanded) {
EditorGUILayout.Space ();
GUILayout.Label ("Number of WayPoints: " + list.arraySize);
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("Add Point")) {
patrol.addNewWayPoint (index);
}
if (GUILayout.Button ("Clear List")) {
patrol.clearWayPoint (index);
}
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
for (int i = 0; i < list.arraySize; i++) {
GUILayout.BeginHorizontal ();
if (i < list.arraySize && i >= 0) {
EditorGUILayout.PropertyField (list.GetArrayElementAtIndex (i), new GUIContent ("", null, ""), false);
}
if (GUILayout.Button ("x")) {
patrol.removeWaypoint (index, i);
}
if (GUILayout.Button ("v")) {
if (i >= 0) {
list.MoveArrayElement (i, i + 1);
}
}
if (GUILayout.Button ("^")) {
if (i < list.arraySize) {
list.MoveArrayElement (i, i - 1);
}
}
GUILayout.EndHorizontal ();
}
}
}
void showPatrolList (SerializedProperty list)
{
EditorGUILayout.Space ();
if (GUILayout.Button ("Show/Hide " + list.displayName, buttonStyle)) {
list.isExpanded = !list.isExpanded;
}
EditorGUILayout.Space ();
if (list.isExpanded) {
EditorGUILayout.Space ();
GUILayout.Label ("Number of Patrols: " + list.arraySize);
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("Add Patrol")) {
patrol.addNewPatrol ();
}
if (GUILayout.Button ("Clear List")) {
patrol.clearPatrolList ();
}
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
for (int i = 0; i < list.arraySize; i++) {
expanded = false;
GUILayout.BeginHorizontal ();
GUILayout.BeginHorizontal ("box");
EditorGUILayout.Space ();
if (i < list.arraySize && i >= 0) {
EditorGUILayout.BeginVertical ();
EditorGUILayout.PropertyField (list.GetArrayElementAtIndex (i), false);
if (list.GetArrayElementAtIndex (i).isExpanded) {
showPatrolInfo (list.GetArrayElementAtIndex (i), i);
expanded = true;
}
EditorGUILayout.Space ();
GUILayout.EndVertical ();
}
GUILayout.EndHorizontal ();
if (expanded) {
GUILayout.BeginVertical ();
} else {
GUILayout.BeginHorizontal ();
}
if (GUILayout.Button ("x")) {
patrol.clearWayPoint (i);
}
if (GUILayout.Button ("v")) {
if (i >= 0) {
list.MoveArrayElement (i, i + 1);
}
}
if (GUILayout.Button ("^")) {
if (i < list.arraySize) {
list.MoveArrayElement (i, i - 1);
}
}
if (expanded) {
GUILayout.EndVertical ();
} else {
GUILayout.EndHorizontal ();
}
GUILayout.EndHorizontal ();
}
}
}
public void showPositionHandle (Transform currentTransform, string handleName)
{
currentRotationHandle = Tools.pivotRotation == PivotRotation.Local ? currentTransform.rotation : Quaternion.identity;
EditorGUI.BeginChangeCheck ();
curretPositionHandle = currentTransform.position;
if (Tools.current == Tool.Move) {
curretPositionHandle = Handles.DoPositionHandle (curretPositionHandle, currentRotationHandle);
}
currentRotationHandle = currentTransform.rotation;
if (Tools.current == Tool.Rotate) {
currentRotationHandle = Handles.DoRotationHandle (currentRotationHandle, curretPositionHandle);
}
if (EditorGUI.EndChangeCheck ()) {
Undo.RecordObject (currentTransform, handleName);
currentTransform.position = curretPositionHandle;
currentTransform.rotation = currentRotationHandle;
}
}
}
#endif

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 9d1f3e10053f58c428a62485df15179d
timeCreated: 1474391004
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/AIWayPointPatrolEditor.cs
uploadId: 814740

View File

@@ -0,0 +1,358 @@
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using System.IO;
using UnityEngine.EventSystems;
#if UNITY_EDITOR
using UnityEditor;
public class AddNewActionSystemToCharacterCreatorEditor : EditorWindow
{
GUISkin guiSkin;
Rect windowRect = new Rect ();
Event currentEvent;
Vector2 rectSize = new Vector2 (660, 600);
bool actionAdded;
float timeToBuild = 0.2f;
float timer;
string prefabsPath = "";
playerActionSystem currentPlayerActionSystem;
public string actionSystemCategoryName = "Others";
public string actionSystemName;
public float actionSystemDuration;
public float actionSystemSpeed = 1;
public bool useActionSystemID;
public int actionSystemID;
public string actionSystemAnimationName;
public bool useCustomPrefabPath;
public string customPrefabPath;
public GameObject currentActionSystemPrefab;
bool actionSystemAssigned;
GUIStyle style = new GUIStyle ();
GUIStyle labelStyle = new GUIStyle ();
float windowHeightPercentage = 0.6f;
Vector2 screenResolution;
Vector2 scrollPos1;
float maxLayoutWidht = 220;
[MenuItem ("Game Kit Controller/Add Action System To Character", false, 25)]
public static void addActionSystemToCharacter ()
{
GetWindow<AddNewActionSystemToCharacterCreatorEditor> ();
}
void OnEnable ()
{
screenResolution = new Vector2 (Screen.currentResolution.width, Screen.currentResolution.height);
// Debug.Log (screenResolution + " " + partsHeight + " " + settingsHeight + " " + previewHeight);
float totalHeight = screenResolution.y * windowHeightPercentage;
if (totalHeight < 600) {
totalHeight = 600;
}
rectSize = new Vector2 (660, totalHeight);
prefabsPath = pathInfoValues.getRegularActionSystemPrefabPath ();
customPrefabPath = prefabsPath;
resetCreatorValues ();
checkCurrentObjectSelected (Selection.activeGameObject);
}
void checkCurrentObjectSelected (GameObject currentCharacterSelected)
{
if (currentCharacterSelected != null) {
playerComponentsManager currentPlayerComponentsManager = currentCharacterSelected.GetComponentInChildren<playerComponentsManager> ();
if (currentPlayerComponentsManager != null) {
currentPlayerActionSystem = currentPlayerComponentsManager.getPlayerActionSystem ();
if (currentPlayerActionSystem != null) {
actionSystemAssigned = true;
currentActionSystemPrefab = UnityEditor.AssetDatabase.LoadAssetAtPath (prefabsPath, typeof(GameObject)) as GameObject;
}
}
}
}
void OnDisable ()
{
resetCreatorValues ();
}
void resetCreatorValues ()
{
if (actionAdded) {
} else {
}
currentPlayerActionSystem = null;
actionAdded = false;
actionSystemAssigned = false;
actionSystemCategoryName = "Others";
actionSystemName = "";
actionSystemDuration = 0;
actionSystemSpeed = 1;
useActionSystemID = false;
actionSystemID = 0;
actionSystemAnimationName = "";
useCustomPrefabPath = false;
Debug.Log ("Action window closed");
}
void OnGUI ()
{
if (!guiSkin) {
guiSkin = Resources.Load ("GUI") as GUISkin;
}
GUI.skin = guiSkin;
this.minSize = rectSize;
this.titleContent = new GUIContent ("Actions", null, "Add New Action System To Character");
GUILayout.BeginVertical ("Add New Action System To Character", "window");
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
windowRect = GUILayoutUtility.GetLastRect ();
// windowRect.position = new Vector2 (0, windowRect.position.y);
windowRect.width = this.maxSize.x;
GUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox ("", MessageType.Info);
style = new GUIStyle (EditorStyles.helpBox);
style.richText = true;
style.fontStyle = FontStyle.Bold;
style.fontSize = 17;
EditorGUILayout.LabelField ("Configure the settings of the new action and press the button 'Add New Action To Character'. \n\n" +
"If not character is selected in the hierarchy, select one and press the button 'Check Current Object Selected'.\n\n" +
"Once the action info is configured and created, remember to go to the character animator and configure the animation state on it, " +
"along its transitions and conditions values.", style);
GUILayout.EndHorizontal ();
if (currentPlayerActionSystem == null) {
GUILayout.FlexibleSpace ();
GUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox ("", MessageType.Warning);
style = new GUIStyle (EditorStyles.helpBox);
style.richText = true;
style.fontStyle = FontStyle.Bold;
style.fontSize = 17;
EditorGUILayout.LabelField ("WARNING: No Character was found, make sure to select the player or an " +
"humanoid AI to add an action to it.", style);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Check Current Object Selected")) {
checkCurrentObjectSelected (Selection.activeGameObject);
}
} else {
if (actionSystemAssigned) {
scrollPos1 = EditorGUILayout.BeginScrollView (scrollPos1, false, false);
GUILayout.FlexibleSpace ();
EditorGUILayout.Space ();
labelStyle.fontStyle = FontStyle.Bold;
EditorGUILayout.LabelField ("ACTION SYSTEM INFO", labelStyle);
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Action Category Name", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
actionSystemCategoryName = (string)EditorGUILayout.TextField ("", actionSystemCategoryName);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Action Name", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
actionSystemName = (string)EditorGUILayout.TextField ("", actionSystemName);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Action Duration", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
actionSystemDuration = (float)EditorGUILayout.FloatField ("", actionSystemDuration);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Action Speed", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
actionSystemSpeed = (float)EditorGUILayout.FloatField ("", actionSystemSpeed);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Use Action ID", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
useActionSystemID = (bool)EditorGUILayout.Toggle (useActionSystemID);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (useActionSystemID) {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Action ID", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
actionSystemID = (int)EditorGUILayout.IntField (actionSystemID);
GUILayout.EndHorizontal ();
} else {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Action Animation Name", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
actionSystemAnimationName = (string)EditorGUILayout.TextField (actionSystemAnimationName);
GUILayout.EndHorizontal ();
}
GUILayout.BeginHorizontal ();
GUILayout.Label ("Action System Prefab", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentActionSystemPrefab = EditorGUILayout.ObjectField (currentActionSystemPrefab, typeof(GameObject), true, GUILayout.ExpandWidth (true)) as GameObject;
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
showCustomPrefabPathOptions ();
EditorGUILayout.EndScrollView ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Add New Action To Character")) {
addActionSystem ();
}
if (GUILayout.Button ("Cancel")) {
this.Close ();
}
}
}
GUILayout.EndVertical ();
}
void showCustomPrefabPathOptions ()
{
GUILayout.BeginHorizontal ();
GUILayout.Label ("Use Custom Prefab Path", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
useCustomPrefabPath = (bool)EditorGUILayout.Toggle ("", useCustomPrefabPath);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (useCustomPrefabPath) {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Custom Prefab Path", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
customPrefabPath = EditorGUILayout.TextField ("", customPrefabPath);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Check Prefabs On New Path")) {
prefabsPath = customPrefabPath;
checkCurrentObjectSelected (Selection.activeGameObject);
}
}
}
void addActionSystem ()
{
if (currentActionSystemPrefab != null) {
GameObject actionSystemObject = (GameObject)Instantiate (currentActionSystemPrefab, Vector3.zero, Quaternion.identity);
actionSystemObject.name = actionSystemName;
actionSystemObject.transform.SetParent (currentPlayerActionSystem.transform);
actionSystemObject.transform.localPosition = Vector3.zero;
actionSystemObject.transform.localRotation = Quaternion.identity;
actionSystem currentActionSystem = actionSystemObject.GetComponent<actionSystem> ();
if (currentActionSystem != null) {
currentActionSystem.addNewActionFromEditor (actionSystemName, actionSystemDuration, actionSystemSpeed,
useActionSystemID, actionSystemID, actionSystemAnimationName);
if (currentPlayerActionSystem.addNewActionFromEditor (currentActionSystem, actionSystemCategoryName, actionSystemName, true, "")) {
Debug.Log ("Action System created and adjusted to character properly");
} else {
Debug.Log ("Action System not created properly, check the player action system component on the character selected");
}
GKC_Utils.setActiveGameObjectInEditor (currentPlayerActionSystem.gameObject);
}
} else {
Debug.Log ("WARNING: no prefab found on path " + prefabsPath);
}
actionAdded = true;
}
void Update ()
{
if (actionAdded) {
if (timer < timeToBuild) {
timer += 0.01f;
if (timer > timeToBuild) {
timer = 0;
this.Close ();
}
}
}
}
}
#endif

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: bda396405ab15ee42ae63693d2da34c4
timeCreated: 1656958819
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/AddNewActionSystemToCharacterCreatorEditor.cs
uploadId: 814740

View File

@@ -0,0 +1,994 @@
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using System.IO;
using UnityEngine.EventSystems;
#if UNITY_EDITOR
using UnityEditor;
public class AddNewMeleeAttackActionSystemToCharacterCreatorEditor : EditorWindow
{
GUISkin guiSkin;
Rect windowRect = new Rect ();
Event currentEvent;
Vector2 rectSize = new Vector2 (660, 600);
bool actionAdded;
float timeToBuild = 0.2f;
float timer;
float minHeight = 600f;
string prefabsPath = "";
playerActionSystem currentPlayerActionSystem;
Animator mainAnimator;
grabbedObjectMeleeAttackSystem mainGrabbedObjectMeleeAttackSystem;
public string actionSystemCategoryName = "Melee Combat";
public string actionSystemName;
public float actionSystemDuration;
public float actionSystemSpeed = 1;
public bool useActionSystemID;
public int actionSystemID;
public string actionSystemAnimationName;
public string attackType = "Regular";
public float attackDamage;
public bool useCustomPrefabPath;
public string customPrefabPath;
public GameObject currentActionSystemPrefab;
public GameObject mainGrabPhysicalObjectMeleeAttackSystemGameObject;
public grabPhysicalObjectMeleeAttackSystem mainGrabPhysicalObjectMeleeAttackSystem;
public meleeWeaponAttackInfo mainMeleeWeaponAttackInfo;
public bool useMeleeWeaponAttackInfoTemplate;
public bool addNewCustomMeleeAttack;
public List<grabPhysicalObjectMeleeAttackSystem.damageTriggerActiveInfo> damageTriggerActiveInfoList = new List<grabPhysicalObjectMeleeAttackSystem.damageTriggerActiveInfo> ();
grabPhysicalObjectMeleeAttackSystem.damageTriggerActiveInfo currentDamageTriggerActiveInfo;
public bool editSingleMeleeAttackInfo;
public AnimationClip newAnimationClip;
public bool setNewAnimationClip;
public string animationLayerName = "Base Layer";
public string [] attackList;
public int attackListIndex;
bool attackListAssigned;
bool attackInfoAssigned;
string originalSingleAttackName;
bool actionSystemAssigned;
GUIStyle style = new GUIStyle ();
GUIStyle labelStyle = new GUIStyle ();
float windowHeightPercentage = 0.6f;
Vector2 screenResolution;
Vector2 scrollPos1;
float maxLayoutWidht = 220;
Vector2 previousRectSize;
[MenuItem ("Game Kit Controller/Add Melee Attack Single or List To Character", false, 26)]
public static void addMeleeAttackActionSystemToCharacter ()
{
GetWindow<AddNewMeleeAttackActionSystemToCharacterCreatorEditor> ();
}
void OnEnable ()
{
screenResolution = new Vector2 (Screen.currentResolution.width, Screen.currentResolution.height);
// Debug.Log (screenResolution + " " + partsHeight + " " + settingsHeight + " " + previewHeight);
float totalHeight = screenResolution.y * windowHeightPercentage;
totalHeight = Mathf.Clamp (totalHeight, minHeight, screenResolution.y);
rectSize = new Vector2 (660, totalHeight);
prefabsPath = pathInfoValues.getMeleeActionSystemPrefabPath ();
customPrefabPath = prefabsPath;
resetCreatorValues ();
checkCurrentObjectSelected (Selection.activeGameObject);
}
void checkCurrentObjectSelected (GameObject currentCharacterSelected)
{
if (currentCharacterSelected != null) {
playerComponentsManager currentPlayerComponentsManager = currentCharacterSelected.GetComponentInChildren<playerComponentsManager> ();
if (currentPlayerComponentsManager != null) {
currentPlayerActionSystem = currentPlayerComponentsManager.getPlayerActionSystem ();
if (currentPlayerActionSystem != null) {
actionSystemAssigned = true;
currentActionSystemPrefab = UnityEditor.AssetDatabase.LoadAssetAtPath (prefabsPath, typeof (GameObject)) as GameObject;
}
mainGrabbedObjectMeleeAttackSystem = currentPlayerComponentsManager.getGrabbedObjectMeleeAttackSystem ();
mainAnimator = currentPlayerComponentsManager.getPlayerController ().getCharacterAnimator ();
}
}
}
void OnDisable ()
{
resetCreatorValues ();
}
void resetCreatorValues ()
{
if (actionAdded) {
} else {
}
currentPlayerActionSystem = null;
actionAdded = false;
actionSystemAssigned = false;
actionSystemCategoryName = "Melee Combat";
actionSystemName = "";
actionSystemDuration = 0;
actionSystemSpeed = 1;
useActionSystemID = false;
actionSystemID = 0;
actionSystemAnimationName = "";
useCustomPrefabPath = false;
useMeleeWeaponAttackInfoTemplate = false;
addNewCustomMeleeAttack = false;
damageTriggerActiveInfoList.Clear ();
editSingleMeleeAttackInfo = false;
attackListAssigned = false;
attackInfoAssigned = false;
setNewAnimationClip = false;
Debug.Log ("Action window closed");
}
void OnGUI ()
{
if (!guiSkin) {
guiSkin = Resources.Load ("GUI") as GUISkin;
}
GUI.skin = guiSkin;
this.minSize = rectSize;
this.titleContent = new GUIContent ("Melee", null, "Add Melee Attack List To Character");
GUILayout.BeginVertical ("Add Melee Attack List To Character", "window");
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
windowRect = GUILayoutUtility.GetLastRect ();
// windowRect.position = new Vector2 (0, windowRect.position.y);
windowRect.width = this.maxSize.x;
GUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox ("", MessageType.Info);
style = new GUIStyle (EditorStyles.helpBox);
style.richText = true;
style.fontStyle = FontStyle.Bold;
style.fontSize = 17;
EditorGUILayout.Space ();
if (addNewCustomMeleeAttack) {
EditorGUILayout.LabelField ("Configure the settings of the melee weapon, " +
"with the info of a new melee attack that will be included on the weapon it self.\n" +
"Remember to set the damage trigger values using the % value (from 0 to 1) of the attack animation to set the for each swing.\n\n" +
"Once the weapon info is configured and created, remember to go to the character animator and configure the animation state on it, " +
"along its transitions and conditions values.", style);
} else {
EditorGUILayout.LabelField ("Configure the settings of the melee weapon, " +
"to use its attack list and press the button 'Add Melee Attack List To Character'. \n\n" +
"If not character is selected in the hierarchy, select one and press the button 'Check Current Object Selected'.\n\n" +
"Once the weapon info is configured and created, remember to go to the character animator and configure the animation state on it, " +
"along its transitions and conditions values.", style);
}
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Window Height", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
if (previousRectSize != rectSize) {
previousRectSize = rectSize;
this.maxSize = rectSize;
}
rectSize.y = EditorGUILayout.Slider (rectSize.y, minHeight, screenResolution.y, GUILayout.ExpandWidth (true));
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (currentPlayerActionSystem == null) {
GUILayout.FlexibleSpace ();
GUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox ("", MessageType.Warning);
style = new GUIStyle (EditorStyles.helpBox);
style.richText = true;
style.fontStyle = FontStyle.Bold;
style.fontSize = 17;
EditorGUILayout.LabelField ("WARNING: No Character was found, make sure to select the player or an " +
"humanoid AI to add an action to it.", style);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Check Current Object Selected")) {
checkCurrentObjectSelected (Selection.activeGameObject);
}
} else {
if (actionSystemAssigned) {
scrollPos1 = EditorGUILayout.BeginScrollView (scrollPos1, false, false);
GUILayout.FlexibleSpace ();
EditorGUILayout.Space ();
labelStyle.fontStyle = FontStyle.Bold;
EditorGUILayout.LabelField ("MELEE WEAPON ATTACK LIST NFO", labelStyle);
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Action Category Name", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
actionSystemCategoryName = (string)EditorGUILayout.TextField ("", actionSystemCategoryName);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Add New Custom Melee Attack", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
addNewCustomMeleeAttack = (bool)EditorGUILayout.Toggle (addNewCustomMeleeAttack);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Edit Single Melee Attack Info", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
editSingleMeleeAttackInfo = (bool)EditorGUILayout.Toggle (editSingleMeleeAttackInfo);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (editSingleMeleeAttackInfo) {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Melee Weapon Object", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
mainGrabPhysicalObjectMeleeAttackSystemGameObject = EditorGUILayout.ObjectField (mainGrabPhysicalObjectMeleeAttackSystemGameObject, typeof (GameObject), true, GUILayout.ExpandWidth (true)) as GameObject;
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Get Melee Weapon Attack List")) {
attackListAssigned = false;
attackInfoAssigned = false;
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Get Melee Weapon Attack Info")) {
if (attackListAssigned) {
grabPhysicalObjectMeleeAttackSystem.attackInfo currentAttackInfo = mainGrabPhysicalObjectMeleeAttackSystem.attackInfoList [attackListIndex];
attackDamage = currentAttackInfo.attackDamage;
attackType = currentAttackInfo.attackType;
actionSystemAnimationName = currentAttackInfo.customActionName;
actionSystemDuration = currentAttackInfo.attackDuration;
actionSystemSpeed = currentAttackInfo.attackAnimationSpeed;
actionSystemSpeed = currentAttackInfo.attackAnimationSpeedOnAir;
originalSingleAttackName = actionSystemAnimationName;
damageTriggerActiveInfoList.Clear ();
for (int i = 0; i < currentAttackInfo.damageTriggerActiveInfoList.Count; i++) {
grabPhysicalObjectMeleeAttackSystem.damageTriggerActiveInfo newTriggerInfo = new grabPhysicalObjectMeleeAttackSystem.damageTriggerActiveInfo ();
newTriggerInfo.delayToActiveTrigger = currentAttackInfo.damageTriggerActiveInfoList [i].delayToActiveTrigger;
newTriggerInfo.activateDamageTrigger = currentAttackInfo.damageTriggerActiveInfoList [i].activateDamageTrigger;
damageTriggerActiveInfoList.Add (newTriggerInfo);
}
attackInfoAssigned = true;
}
}
EditorGUILayout.Space ();
if (!attackListAssigned) {
if (mainGrabPhysicalObjectMeleeAttackSystemGameObject != null) {
mainGrabPhysicalObjectMeleeAttackSystem = mainGrabPhysicalObjectMeleeAttackSystemGameObject.GetComponent<grabPhysicalObjectMeleeAttackSystem> ();
if (mainGrabPhysicalObjectMeleeAttackSystem != null) {
attackList = new string [mainGrabPhysicalObjectMeleeAttackSystem.attackInfoList.Count];
int currentIndex = 0;
for (int i = 0; i < mainGrabPhysicalObjectMeleeAttackSystem.attackInfoList.Count; i++) {
string currentAttackName = mainGrabPhysicalObjectMeleeAttackSystem.attackInfoList [i].customActionName;
attackList [currentIndex] = currentAttackName;
currentIndex++;
}
attackListAssigned = true;
}
}
} else {
if (attackList.Length > 0) {
EditorGUILayout.Space ();
if (attackListIndex < attackList.Length) {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Attack Info", EditorStyles.boldLabel, GUILayout.MaxWidth (150));
attackListIndex = EditorGUILayout.Popup (attackListIndex, attackList);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
}
}
}
if (attackInfoAssigned) {
GUILayout.Label ("MELEE ATTACK INFO", EditorStyles.boldLabel);
GUILayout.BeginHorizontal ();
GUILayout.Label ("Attack Animation Name", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
actionSystemAnimationName = (string)EditorGUILayout.TextField ("", actionSystemAnimationName);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Attack Type", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
attackType = (string)EditorGUILayout.TextField ("", attackType);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Attack Damage", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
attackDamage = (float)EditorGUILayout.FloatField (attackDamage);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Attack Duration", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
actionSystemDuration = (float)EditorGUILayout.FloatField (actionSystemDuration);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Attack Speed", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
actionSystemSpeed = (float)EditorGUILayout.FloatField (actionSystemSpeed);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
GUILayout.Label ("Damage Trigger Delays Settings", EditorStyles.boldLabel);
EditorGUILayout.Space ();
GUILayout.Label ("Number of Elements " + (damageTriggerActiveInfoList.Count).ToString (), EditorStyles.boldLabel);
EditorGUILayout.Space ();
for (int i = 0; i < damageTriggerActiveInfoList.Count; i++) {
currentDamageTriggerActiveInfo = damageTriggerActiveInfoList [i];
GUILayout.BeginVertical ("box");
GUILayout.BeginHorizontal ();
GUILayout.Label ("Delay To Activate Damage Trigger", EditorStyles.boldLabel);
currentDamageTriggerActiveInfo.delayToActiveTrigger = (float)EditorGUILayout.FloatField (currentDamageTriggerActiveInfo.delayToActiveTrigger);
GUILayout.EndHorizontal ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Activate Damage Trigger State", EditorStyles.boldLabel);
currentDamageTriggerActiveInfo.activateDamageTrigger = (bool)EditorGUILayout.Toggle (currentDamageTriggerActiveInfo.activateDamageTrigger);
GUILayout.EndHorizontal ();
GUILayout.EndVertical ();
EditorGUILayout.Space ();
}
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("Clear Values")) {
damageTriggerActiveInfoList.Clear ();
}
if (GUILayout.Button ("Add New Value")) {
grabPhysicalObjectMeleeAttackSystem.damageTriggerActiveInfo newDamageTriggerActiveInfo = new grabPhysicalObjectMeleeAttackSystem.damageTriggerActiveInfo ();
damageTriggerActiveInfoList.Add (newDamageTriggerActiveInfo);
}
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Set New Animation Clip", EditorStyles.boldLabel);
setNewAnimationClip = (bool)EditorGUILayout.Toggle (setNewAnimationClip);
GUILayout.EndHorizontal ();
if (setNewAnimationClip) {
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Animation Clip", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
newAnimationClip = EditorGUILayout.ObjectField (newAnimationClip, typeof (AnimationClip), true, GUILayout.ExpandWidth (true)) as AnimationClip;
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Animation Layer Name", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
animationLayerName = (string)EditorGUILayout.TextField ("", animationLayerName);
GUILayout.EndHorizontal ();
}
}
} else {
if (!addNewCustomMeleeAttack) {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Use Attack List Template", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
useMeleeWeaponAttackInfoTemplate = (bool)EditorGUILayout.Toggle (useMeleeWeaponAttackInfoTemplate);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (useMeleeWeaponAttackInfoTemplate) {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Attack List Template", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
mainMeleeWeaponAttackInfo = EditorGUILayout.ObjectField (mainMeleeWeaponAttackInfo, typeof (meleeWeaponAttackInfo), true, GUILayout.ExpandWidth (true)) as meleeWeaponAttackInfo;
GUILayout.EndHorizontal ();
} else {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Melee Weapon Object", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
mainGrabPhysicalObjectMeleeAttackSystemGameObject = EditorGUILayout.ObjectField (mainGrabPhysicalObjectMeleeAttackSystemGameObject, typeof (GameObject), true, GUILayout.ExpandWidth (true)) as GameObject;
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox ("", MessageType.Info);
style = new GUIStyle (EditorStyles.helpBox);
style.richText = true;
style.fontStyle = FontStyle.Bold;
style.fontSize = 12;
EditorGUILayout.LabelField ("The melee weapons object prefabs are on the folder: \n " +
"Assets\\Game Kit Controller\\Prefabs\\Melee Combat System\\Melee Weapons\n", style);
GUILayout.EndHorizontal ();
}
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Action System Prefab", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentActionSystemPrefab = EditorGUILayout.ObjectField (currentActionSystemPrefab, typeof (GameObject), true, GUILayout.ExpandWidth (true)) as GameObject;
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
showCustomPrefabPathOptions ();
} else {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Melee Weapon Object", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
mainGrabPhysicalObjectMeleeAttackSystemGameObject = EditorGUILayout.ObjectField (mainGrabPhysicalObjectMeleeAttackSystemGameObject, typeof (GameObject), true, GUILayout.ExpandWidth (true)) as GameObject;
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
GUILayout.Label ("MELEE ATTACK INFO", EditorStyles.boldLabel);
GUILayout.BeginHorizontal ();
GUILayout.Label ("Attack Animation Name", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
actionSystemAnimationName = (string)EditorGUILayout.TextField ("", actionSystemAnimationName);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Attack Type", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
attackType = (string)EditorGUILayout.TextField ("", attackType);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Attack Damage", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
attackDamage = (float)EditorGUILayout.FloatField (attackDamage);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Attack Duration", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
actionSystemDuration = (float)EditorGUILayout.FloatField (actionSystemDuration);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Attack Speed", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
actionSystemSpeed = (float)EditorGUILayout.FloatField (actionSystemSpeed);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
GUILayout.Label ("Damage Trigger Delays Settings", EditorStyles.boldLabel);
EditorGUILayout.Space ();
GUILayout.Label ("Number of Elements " + (damageTriggerActiveInfoList.Count).ToString (), EditorStyles.boldLabel);
EditorGUILayout.Space ();
for (int i = 0; i < damageTriggerActiveInfoList.Count; i++) {
currentDamageTriggerActiveInfo = damageTriggerActiveInfoList [i];
GUILayout.BeginVertical ("box");
GUILayout.BeginHorizontal ();
GUILayout.Label ("Delay To Activate Damage Trigger", EditorStyles.boldLabel);
currentDamageTriggerActiveInfo.delayToActiveTrigger = (float)EditorGUILayout.FloatField (currentDamageTriggerActiveInfo.delayToActiveTrigger);
GUILayout.EndHorizontal ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Activate Damage Trigger State", EditorStyles.boldLabel);
currentDamageTriggerActiveInfo.activateDamageTrigger = (bool)EditorGUILayout.Toggle (currentDamageTriggerActiveInfo.activateDamageTrigger);
GUILayout.EndHorizontal ();
GUILayout.EndVertical ();
EditorGUILayout.Space ();
}
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("Clear Values")) {
damageTriggerActiveInfoList.Clear ();
}
if (GUILayout.Button ("Add New Value")) {
grabPhysicalObjectMeleeAttackSystem.damageTriggerActiveInfo newDamageTriggerActiveInfo = new grabPhysicalObjectMeleeAttackSystem.damageTriggerActiveInfo ();
damageTriggerActiveInfoList.Add (newDamageTriggerActiveInfo);
}
GUILayout.EndHorizontal ();
}
}
EditorGUILayout.EndScrollView ();
EditorGUILayout.Space ();
if (editSingleMeleeAttackInfo) {
if (GUILayout.Button ("Update Melee Attack Info")) {
if (attackListAssigned && attackInfoAssigned) {
updateMeleeAttackInfo ();
}
}
} else {
if (GUILayout.Button ("Add Melee Attack List To Character")) {
addActionSystem ();
}
}
if (GUILayout.Button ("Cancel")) {
this.Close ();
}
}
}
GUILayout.EndVertical ();
}
void showCustomPrefabPathOptions ()
{
GUILayout.BeginHorizontal ();
GUILayout.Label ("Use Custom Prefab Path", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
useCustomPrefabPath = (bool)EditorGUILayout.Toggle ("", useCustomPrefabPath);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (useCustomPrefabPath) {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Custom Prefab Path", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
customPrefabPath = EditorGUILayout.TextField ("", customPrefabPath);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Check Prefabs On New Path")) {
prefabsPath = customPrefabPath;
checkCurrentObjectSelected (Selection.activeGameObject);
}
}
}
void addActionSystem ()
{
bool checkResult = true;
if (currentActionSystemPrefab == null) {
Debug.Log ("WARNING: no prefab found on path " + prefabsPath);
checkResult = false;
}
if (mainGrabPhysicalObjectMeleeAttackSystemGameObject == null) {
if (!useMeleeWeaponAttackInfoTemplate && !addNewCustomMeleeAttack) {
Debug.Log ("WARNING: no melee weapon object assigned");
checkResult = false;
}
}
if (addNewCustomMeleeAttack && damageTriggerActiveInfoList.Count < 2) {
Debug.Log ("WARNING: make sure to configure at least 2 damage trigger elements on the list for the damage detection");
checkResult = false;
}
if (!checkResult) {
return;
}
if (addNewCustomMeleeAttack) {
grabPhysicalObjectMeleeAttackSystem.attackInfo newAttackInfo = new grabPhysicalObjectMeleeAttackSystem.attackInfo ();
newAttackInfo.attackDamage = attackDamage;
newAttackInfo.attackType = attackType;
newAttackInfo.customActionName = actionSystemAnimationName;
newAttackInfo.useCustomAction = true;
newAttackInfo.attackDuration = actionSystemDuration;
newAttackInfo.attackDurationOnAir = actionSystemDuration;
newAttackInfo.attackAnimationSpeed = actionSystemSpeed;
newAttackInfo.attackAnimationSpeedOnAir = actionSystemSpeed;
newAttackInfo.minDelayBeforeNextAttack = 1;
newAttackInfo.playerOnGroundToActivateAttack = false;
for (int i = 0; i < damageTriggerActiveInfoList.Count; i++) {
grabPhysicalObjectMeleeAttackSystem.damageTriggerActiveInfo newTriggerInfo = new grabPhysicalObjectMeleeAttackSystem.damageTriggerActiveInfo (damageTriggerActiveInfoList [i]);
newTriggerInfo.checkSurfacesWithCapsuleRaycast = true;
newTriggerInfo.checkSurfaceCapsuleRaycastRadius = 0.1f;
newAttackInfo.damageTriggerActiveInfoList.Add (newTriggerInfo);
}
if (mainGrabPhysicalObjectMeleeAttackSystemGameObject != null) {
mainGrabPhysicalObjectMeleeAttackSystem = mainGrabPhysicalObjectMeleeAttackSystemGameObject.GetComponent<grabPhysicalObjectMeleeAttackSystem> ();
if (mainGrabPhysicalObjectMeleeAttackSystem != null) {
mainGrabPhysicalObjectMeleeAttackSystem.attackInfoList.Add (newAttackInfo);
GKC_Utils.updateComponent (mainGrabPhysicalObjectMeleeAttackSystem);
GKC_Utils.updateDirtyScene ("Update Melee Weapon Info", mainGrabPhysicalObjectMeleeAttackSystemGameObject);
if (mainGrabbedObjectMeleeAttackSystem != null) {
mainGrabbedObjectMeleeAttackSystem.addEventOnDamageInfoList (mainGrabPhysicalObjectMeleeAttackSystem.weaponInfoName);
GKC_Utils.updateComponent (mainGrabbedObjectMeleeAttackSystem);
}
}
}
addAttackInfoAsActionSystem (newAttackInfo);
}
if (!addNewCustomMeleeAttack) {
List<grabPhysicalObjectMeleeAttackSystem.attackInfo> mainAttackInfoList = new List<grabPhysicalObjectMeleeAttackSystem.attackInfo> ();
if (useMeleeWeaponAttackInfoTemplate) {
mainAttackInfoList = mainMeleeWeaponAttackInfo.mainMeleeWeaponInfo.mainAttackInfoList;
} else {
if (mainGrabPhysicalObjectMeleeAttackSystemGameObject != null) {
mainGrabPhysicalObjectMeleeAttackSystem = mainGrabPhysicalObjectMeleeAttackSystemGameObject.GetComponent<grabPhysicalObjectMeleeAttackSystem> ();
if (mainGrabPhysicalObjectMeleeAttackSystem) {
mainAttackInfoList = mainGrabPhysicalObjectMeleeAttackSystem.attackInfoList;
}
}
}
for (int i = 0; i < mainAttackInfoList.Count; i++) {
grabPhysicalObjectMeleeAttackSystem.attackInfo currentAttackInfo = mainAttackInfoList [i];
addAttackInfoAsActionSystem (currentAttackInfo);
}
}
currentPlayerActionSystem.updateActionList (false);
GKC_Utils.setActiveGameObjectInEditor (currentPlayerActionSystem.gameObject);
actionAdded = true;
}
void addAttackInfoAsActionSystem (grabPhysicalObjectMeleeAttackSystem.attackInfo currentAttackInfo)
{
actionSystemName = currentAttackInfo.customActionName;
if (!currentPlayerActionSystem.checkActionSystemAlreadyExists (actionSystemName)) {
GameObject actionSystemObject = (GameObject)Instantiate (currentActionSystemPrefab, Vector3.zero, Quaternion.identity);
actionSystemDuration = currentAttackInfo.attackDuration;
actionSystemSpeed = currentAttackInfo.attackAnimationSpeed;
useActionSystemID = false;
actionSystemID = 0;
actionSystemAnimationName = actionSystemName;
actionSystemObject.name = actionSystemName;
actionSystemObject.transform.SetParent (currentPlayerActionSystem.transform);
actionSystemObject.transform.localPosition = Vector3.zero;
actionSystemObject.transform.localRotation = Quaternion.identity;
actionSystem currentActionSystem = actionSystemObject.GetComponent<actionSystem> ();
if (currentActionSystem != null) {
currentActionSystem.addNewActionFromEditor (actionSystemName, actionSystemDuration, actionSystemSpeed,
useActionSystemID, actionSystemID, actionSystemAnimationName);
bool addNewActionResult = currentPlayerActionSystem.addNewActionFromEditor (currentActionSystem,
actionSystemCategoryName, actionSystemName, false, "Sword 1 Hand");
if (addNewActionResult) {
Debug.Log ("Action System created and adjusted to character properly");
} else {
Debug.Log ("Action System not created properly, check the player action system component on the character selected");
}
}
} else {
Debug.Log (actionSystemName + " attack already configured, ignored in this case");
}
}
void updateMeleeAttackInfo ()
{
//update the attack info on the weapon attack list and in the action system of that attack
mainGrabPhysicalObjectMeleeAttackSystem.updateMeleeAttackInfo (attackListIndex, attackDamage, attackType, actionSystemAnimationName, actionSystemDuration,
actionSystemSpeed, damageTriggerActiveInfoList);
currentPlayerActionSystem.setNewInfoOnAction (actionSystemCategoryName, originalSingleAttackName, actionSystemAnimationName, actionSystemDuration, actionSystemSpeed);
GKC_Utils.setActiveGameObjectInEditor (currentPlayerActionSystem.gameObject);
replaceAnimationAction ();
actionAdded = true;
}
int numberOfLoops = 0;
public void replaceAnimationAction ()
{
numberOfLoops = 0;
if (mainAnimator == null) {
Debug.Log ("No animator found on scene");
return;
}
bool animationStateFound = false;
UnityEditor.Animations.AnimatorController ac = mainAnimator.runtimeAnimatorController as UnityEditor.Animations.AnimatorController;
foreach (var layer in ac.layers) {
if (!animationStateFound) {
if (layer.name == animationLayerName) {
Debug.Log ("Animator Layer to check: " + layer.name);
Debug.Log ("\n\n\n");
getChildAnimatorState (originalSingleAttackName, layer.stateMachine);
Debug.Log ("\n\n\n");
if (animatorStateToReplace.state != null) {
Debug.Log ("\n\n\n");
Debug.Log ("STATE FOUND ############################################################################################");
Debug.Log ("Last animator state found " + animatorStateToReplace.state.name + " " + numberOfLoops);
if (animatorStateToReplace.state.name == originalSingleAttackName) {
animationStateFound = true;
Debug.Log ("name changed from " + animatorStateToReplace.state.name + " to " + actionSystemAnimationName);
animatorStateToReplace.state.name = actionSystemAnimationName;
if (setNewAnimationClip) {
animatorStateToReplace.state.motion = newAnimationClip;
}
animatorStateToReplace.state.speed = actionSystemSpeed;
//animatorStateToReplace.state.mirror = newAnimationIsMirror;
//animatorStateToReplace.state.AddExitTransition ();
}
}
}
}
}
if (animationStateFound) {
Debug.Log ("Animation State found and replaced properly");
AssetDatabase.Refresh ();
} else {
Debug.Log ("Animation State not found");
}
}
UnityEditor.Animations.ChildAnimatorState animatorStateToReplace;
public void getChildAnimatorState (string stateName, UnityEditor.Animations.AnimatorStateMachine stateMachine)
{
Debug.Log ("State Machine to check: " + stateMachine.name + " " + stateMachine.stateMachines.Length);
if (stateMachine.stateMachines.Length > 0) {
foreach (var currentStateMachine in stateMachine.stateMachines) {
numberOfLoops++;
if (numberOfLoops > 30000) {
Debug.Log ("number of loops too big");
return;
}
getChildAnimatorState (stateName, currentStateMachine.stateMachine);
}
} else {
foreach (var currentState in stateMachine.states) {
if (currentState.state.name == stateName) {
animatorStateToReplace = currentState;
}
}
}
}
void Update ()
{
if (actionAdded) {
if (timer < timeToBuild) {
timer += 0.01f;
if (timer > timeToBuild) {
timer = 0;
this.Close ();
}
}
}
}
}
#endif

View File

@@ -0,0 +1,968 @@
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using System.IO;
using UnityEngine.EventSystems;
#if UNITY_EDITOR
using UnityEditor;
public class AddNewMeleeAttackActionSystemToCharacterCreatorEditor : EditorWindow
{
GUISkin guiSkin;
Rect windowRect = new Rect ();
Event currentEvent;
Vector2 rectSize = new Vector2 (660, 600);
bool actionAdded;
float timeToBuild = 0.2f;
float timer;
float minHeight = 600f;
string prefabsPath = "";
playerActionSystem currentPlayerActionSystem;
Animator mainAnimator;
grabbedObjectMeleeAttackSystem mainGrabbedObjectMeleeAttackSystem;
public string actionSystemCategoryName = "Melee Combat";
public string actionSystemName;
public float actionSystemDuration;
public float actionSystemSpeed = 1;
public bool useActionSystemID;
public int actionSystemID;
public string actionSystemAnimationName;
public string attackType = "Regular";
public float attackDamage;
public bool useCustomPrefabPath;
public string customPrefabPath;
public GameObject currentActionSystemPrefab;
public GameObject mainGrabPhysicalObjectMeleeAttackSystemGameObject;
public grabPhysicalObjectMeleeAttackSystem mainGrabPhysicalObjectMeleeAttackSystem;
public meleeWeaponAttackInfo mainMeleeWeaponAttackInfo;
public bool useMeleeWeaponAttackInfoTemplate;
public bool addNewCustomMeleeAttack;
public List<grabPhysicalObjectMeleeAttackSystem.damageTriggerActiveInfo> damageTriggerActiveInfoList = new List<grabPhysicalObjectMeleeAttackSystem.damageTriggerActiveInfo> ();
grabPhysicalObjectMeleeAttackSystem.damageTriggerActiveInfo currentDamageTriggerActiveInfo;
public bool editSingleMeleeAttackInfo;
public AnimationClip newAnimationClip;
public bool setNewAnimationClip;
public string animationLayerName = "Base Layer";
public string[] attackList;
public int attackListIndex;
bool attackListAssigned;
bool attackInfoAssigned;
string originalSingleAttackName;
bool actionSystemAssigned;
GUIStyle style = new GUIStyle ();
GUIStyle labelStyle = new GUIStyle ();
float windowHeightPercentage = 0.6f;
Vector2 screenResolution;
Vector2 scrollPos1;
float maxLayoutWidht = 220;
Vector2 previousRectSize;
[MenuItem ("Game Kit Controller/Add Melee Attack Single or List To Character", false, 26)]
public static void addMeleeAttackActionSystemToCharacter ()
{
GetWindow<AddNewMeleeAttackActionSystemToCharacterCreatorEditor> ();
}
void OnEnable ()
{
screenResolution = new Vector2 (Screen.currentResolution.width, Screen.currentResolution.height);
// Debug.Log (screenResolution + " " + partsHeight + " " + settingsHeight + " " + previewHeight);
float totalHeight = screenResolution.y * windowHeightPercentage;
totalHeight = Mathf.Clamp (totalHeight, minHeight, screenResolution.y);
rectSize = new Vector2 (660, totalHeight);
prefabsPath = pathInfoValues.getMeleeActionSystemPrefabPath ();
customPrefabPath = prefabsPath;
resetCreatorValues ();
checkCurrentObjectSelected (Selection.activeGameObject);
}
void checkCurrentObjectSelected (GameObject currentCharacterSelected)
{
if (currentCharacterSelected != null) {
playerComponentsManager currentPlayerComponentsManager = currentCharacterSelected.GetComponentInChildren<playerComponentsManager> ();
if (currentPlayerComponentsManager != null) {
currentPlayerActionSystem = currentPlayerComponentsManager.getPlayerActionSystem ();
if (currentPlayerActionSystem != null) {
actionSystemAssigned = true;
currentActionSystemPrefab = UnityEditor.AssetDatabase.LoadAssetAtPath (prefabsPath, typeof(GameObject)) as GameObject;
}
mainGrabbedObjectMeleeAttackSystem = currentPlayerComponentsManager.getGrabbedObjectMeleeAttackSystem ();
mainAnimator = currentPlayerComponentsManager.getPlayerController ().getCharacterAnimator ();
}
}
}
void OnDisable ()
{
resetCreatorValues ();
}
void resetCreatorValues ()
{
if (actionAdded) {
} else {
}
currentPlayerActionSystem = null;
actionAdded = false;
actionSystemAssigned = false;
actionSystemCategoryName = "Melee Combat";
actionSystemName = "";
actionSystemDuration = 0;
actionSystemSpeed = 1;
useActionSystemID = false;
actionSystemID = 0;
actionSystemAnimationName = "";
useCustomPrefabPath = false;
useMeleeWeaponAttackInfoTemplate = false;
addNewCustomMeleeAttack = false;
damageTriggerActiveInfoList.Clear ();
editSingleMeleeAttackInfo = false;
attackListAssigned = false;
attackInfoAssigned = false;
setNewAnimationClip = false;
Debug.Log ("Action window closed");
}
void OnGUI ()
{
if (!guiSkin) {
guiSkin = Resources.Load ("GUI") as GUISkin;
}
GUI.skin = guiSkin;
this.minSize = rectSize;
this.titleContent = new GUIContent ("Melee", null, "Add Melee Attack List To Character");
GUILayout.BeginVertical ("Add Melee Attack List To Character", "window");
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
windowRect = GUILayoutUtility.GetLastRect ();
// windowRect.position = new Vector2 (0, windowRect.position.y);
windowRect.width = this.maxSize.x;
GUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox ("", MessageType.Info);
style = new GUIStyle (EditorStyles.helpBox);
style.richText = true;
style.fontStyle = FontStyle.Bold;
style.fontSize = 17;
EditorGUILayout.Space ();
if (addNewCustomMeleeAttack) {
EditorGUILayout.LabelField ("Configure the settings of the melee weapon, " +
"with the info of a new melee attack that will be included on the weapon it self.\n" +
"Remember to set the damage trigger values using the % value (from 0 to 1) of the attack animation to set the for each swing.\n\n" +
"Once the weapon info is configured and created, remember to go to the character animator and configure the animation state on it, " +
"along its transitions and conditions values.", style);
} else {
EditorGUILayout.LabelField ("Configure the settings of the melee weapon, " +
"to use its attack list and press the button 'Add Melee Attack List To Character'. \n\n" +
"If not character is selected in the hierarchy, select one and press the button 'Check Current Object Selected'.\n\n" +
"Once the weapon info is configured and created, remember to go to the character animator and configure the animation state on it, " +
"along its transitions and conditions values.", style);
}
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Window Height", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
if (previousRectSize != rectSize) {
previousRectSize = rectSize;
this.maxSize = rectSize;
}
rectSize.y = EditorGUILayout.Slider (rectSize.y, minHeight, screenResolution.y, GUILayout.ExpandWidth (true));
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (currentPlayerActionSystem == null) {
GUILayout.FlexibleSpace ();
GUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox ("", MessageType.Warning);
style = new GUIStyle (EditorStyles.helpBox);
style.richText = true;
style.fontStyle = FontStyle.Bold;
style.fontSize = 17;
EditorGUILayout.LabelField ("WARNING: No Character was found, make sure to select the player or an " +
"humanoid AI to add an action to it.", style);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Check Current Object Selected")) {
checkCurrentObjectSelected (Selection.activeGameObject);
}
} else {
if (actionSystemAssigned) {
scrollPos1 = EditorGUILayout.BeginScrollView (scrollPos1, false, false);
GUILayout.FlexibleSpace ();
EditorGUILayout.Space ();
labelStyle.fontStyle = FontStyle.Bold;
EditorGUILayout.LabelField ("MELEE WEAPON ATTACK LIST NFO", labelStyle);
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Action Category Name", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
actionSystemCategoryName = (string)EditorGUILayout.TextField ("", actionSystemCategoryName);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Add New Custom Melee Attack", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
addNewCustomMeleeAttack = (bool)EditorGUILayout.Toggle (addNewCustomMeleeAttack);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Edit Single Melee Attack Info", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
editSingleMeleeAttackInfo = (bool)EditorGUILayout.Toggle (editSingleMeleeAttackInfo);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (editSingleMeleeAttackInfo) {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Melee Weapon Object", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
mainGrabPhysicalObjectMeleeAttackSystemGameObject = EditorGUILayout.ObjectField (mainGrabPhysicalObjectMeleeAttackSystemGameObject, typeof(GameObject), true, GUILayout.ExpandWidth (true)) as GameObject;
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Get Melee Weapon Attack List")) {
attackListAssigned = false;
attackInfoAssigned = false;
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Get Melee Weapon Attack Info")) {
if (attackListAssigned) {
grabPhysicalObjectMeleeAttackSystem.attackInfo currentAttackInfo = mainGrabPhysicalObjectMeleeAttackSystem.attackInfoList [attackListIndex];
attackDamage = currentAttackInfo.attackDamage;
attackType = currentAttackInfo.attackType;
actionSystemAnimationName = currentAttackInfo.customActionName;
actionSystemDuration = currentAttackInfo.attackDuration;
actionSystemDuration = currentAttackInfo.attackDurationOnAir;
actionSystemSpeed = currentAttackInfo.attackAnimationSpeed;
actionSystemSpeed = currentAttackInfo.attackAnimationSpeedOnAir;
originalSingleAttackName = actionSystemAnimationName;
damageTriggerActiveInfoList.Clear ();
for (int i = 0; i < currentAttackInfo.damageTriggerActiveInfoList.Count; i++) {
grabPhysicalObjectMeleeAttackSystem.damageTriggerActiveInfo newTriggerInfo = new grabPhysicalObjectMeleeAttackSystem.damageTriggerActiveInfo ();
newTriggerInfo.delayToActiveTrigger = currentAttackInfo.damageTriggerActiveInfoList [i].delayToActiveTrigger;
newTriggerInfo.activateDamageTrigger = currentAttackInfo.damageTriggerActiveInfoList [i].activateDamageTrigger;
damageTriggerActiveInfoList.Add (newTriggerInfo);
}
attackInfoAssigned = true;
}
}
EditorGUILayout.Space ();
if (!attackListAssigned) {
if (mainGrabPhysicalObjectMeleeAttackSystemGameObject != null) {
mainGrabPhysicalObjectMeleeAttackSystem = mainGrabPhysicalObjectMeleeAttackSystemGameObject.GetComponent<grabPhysicalObjectMeleeAttackSystem> ();
if (mainGrabPhysicalObjectMeleeAttackSystem != null) {
attackList = new string[mainGrabPhysicalObjectMeleeAttackSystem.attackInfoList.Count];
int currentIndex = 0;
for (int i = 0; i < mainGrabPhysicalObjectMeleeAttackSystem.attackInfoList.Count; i++) {
string currentAttackName = mainGrabPhysicalObjectMeleeAttackSystem.attackInfoList [i].customActionName;
attackList [currentIndex] = currentAttackName;
currentIndex++;
}
attackListAssigned = true;
}
}
} else {
if (attackList.Length > 0) {
EditorGUILayout.Space ();
if (attackListIndex < attackList.Length) {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Attack Info", EditorStyles.boldLabel, GUILayout.MaxWidth (150));
attackListIndex = EditorGUILayout.Popup (attackListIndex, attackList);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
}
}
}
if (attackInfoAssigned) {
GUILayout.Label ("MELEE ATTACK INFO", EditorStyles.boldLabel);
GUILayout.BeginHorizontal ();
GUILayout.Label ("Attack Animation Name", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
actionSystemAnimationName = (string)EditorGUILayout.TextField ("", actionSystemAnimationName);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Attack Type", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
attackType = (string)EditorGUILayout.TextField ("", attackType);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Attack Damage", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
attackDamage = (float)EditorGUILayout.FloatField (attackDamage);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Attack Duration", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
actionSystemDuration = (float)EditorGUILayout.FloatField (actionSystemDuration);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Attack Speed", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
actionSystemSpeed = (float)EditorGUILayout.FloatField (actionSystemSpeed);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
GUILayout.Label ("Number of Elements " + (damageTriggerActiveInfoList.Count).ToString (), EditorStyles.boldLabel);
EditorGUILayout.Space ();
for (int i = 0; i < damageTriggerActiveInfoList.Count; i++) {
currentDamageTriggerActiveInfo = damageTriggerActiveInfoList [i];
GUILayout.BeginVertical ("box");
GUILayout.BeginHorizontal ();
GUILayout.Label ("Delay To Activate Damage Trigger", EditorStyles.boldLabel);
currentDamageTriggerActiveInfo.delayToActiveTrigger = (float)EditorGUILayout.FloatField (currentDamageTriggerActiveInfo.delayToActiveTrigger);
GUILayout.EndHorizontal ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Activate Damage Trigger State", EditorStyles.boldLabel);
currentDamageTriggerActiveInfo.activateDamageTrigger = (bool)EditorGUILayout.Toggle (currentDamageTriggerActiveInfo.activateDamageTrigger);
GUILayout.EndHorizontal ();
GUILayout.EndVertical ();
EditorGUILayout.Space ();
}
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Set New Animation Clip", EditorStyles.boldLabel);
setNewAnimationClip = (bool)EditorGUILayout.Toggle (setNewAnimationClip);
GUILayout.EndHorizontal ();
if (setNewAnimationClip) {
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Animation Clip", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
newAnimationClip = EditorGUILayout.ObjectField (newAnimationClip, typeof(AnimationClip), true, GUILayout.ExpandWidth (true)) as AnimationClip;
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Animation Layer Name", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
animationLayerName = (string)EditorGUILayout.TextField ("", animationLayerName);
GUILayout.EndHorizontal ();
}
}
} else {
if (!addNewCustomMeleeAttack) {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Use Attack List Template", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
useMeleeWeaponAttackInfoTemplate = (bool)EditorGUILayout.Toggle (useMeleeWeaponAttackInfoTemplate);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (useMeleeWeaponAttackInfoTemplate) {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Attack List Template", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
mainMeleeWeaponAttackInfo = EditorGUILayout.ObjectField (mainMeleeWeaponAttackInfo, typeof(meleeWeaponAttackInfo), true, GUILayout.ExpandWidth (true)) as meleeWeaponAttackInfo;
GUILayout.EndHorizontal ();
} else {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Melee Weapon Object", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
mainGrabPhysicalObjectMeleeAttackSystemGameObject = EditorGUILayout.ObjectField (mainGrabPhysicalObjectMeleeAttackSystemGameObject, typeof(GameObject), true, GUILayout.ExpandWidth (true)) as GameObject;
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox ("", MessageType.Info);
style = new GUIStyle (EditorStyles.helpBox);
style.richText = true;
style.fontStyle = FontStyle.Bold;
style.fontSize = 12;
EditorGUILayout.LabelField ("The melee weapons object prefabs are on the folder: \n " +
"Assets\\Game Kit Controller\\Prefabs\\Melee Combat System\\Melee Weapons\n", style);
GUILayout.EndHorizontal ();
}
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Action System Prefab", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentActionSystemPrefab = EditorGUILayout.ObjectField (currentActionSystemPrefab, typeof(GameObject), true, GUILayout.ExpandWidth (true)) as GameObject;
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
showCustomPrefabPathOptions ();
} else {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Melee Weapon Object", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
mainGrabPhysicalObjectMeleeAttackSystemGameObject = EditorGUILayout.ObjectField (mainGrabPhysicalObjectMeleeAttackSystemGameObject, typeof(GameObject), true, GUILayout.ExpandWidth (true)) as GameObject;
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
GUILayout.Label ("MELEE ATTACK INFO", EditorStyles.boldLabel);
GUILayout.BeginHorizontal ();
GUILayout.Label ("Attack Animation Name", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
actionSystemAnimationName = (string)EditorGUILayout.TextField ("", actionSystemAnimationName);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Attack Type", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
attackType = (string)EditorGUILayout.TextField ("", attackType);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Attack Damage", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
attackDamage = (float)EditorGUILayout.FloatField (attackDamage);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Attack Duration", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
actionSystemDuration = (float)EditorGUILayout.FloatField (actionSystemDuration);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Attack Speed", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
actionSystemSpeed = (float)EditorGUILayout.FloatField (actionSystemSpeed);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
GUILayout.Label ("Number of Elements " + (damageTriggerActiveInfoList.Count).ToString (), EditorStyles.boldLabel);
EditorGUILayout.Space ();
for (int i = 0; i < damageTriggerActiveInfoList.Count; i++) {
currentDamageTriggerActiveInfo = damageTriggerActiveInfoList [i];
GUILayout.BeginVertical ("box");
GUILayout.BeginHorizontal ();
GUILayout.Label ("Delay To Activate Damage Trigger", EditorStyles.boldLabel);
currentDamageTriggerActiveInfo.delayToActiveTrigger = (float)EditorGUILayout.FloatField (currentDamageTriggerActiveInfo.delayToActiveTrigger);
GUILayout.EndHorizontal ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Activate Damage Trigger State", EditorStyles.boldLabel);
currentDamageTriggerActiveInfo.activateDamageTrigger = (bool)EditorGUILayout.Toggle (currentDamageTriggerActiveInfo.activateDamageTrigger);
GUILayout.EndHorizontal ();
GUILayout.EndVertical ();
EditorGUILayout.Space ();
}
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("Clear Values")) {
damageTriggerActiveInfoList.Clear ();
}
if (GUILayout.Button ("Add New Value")) {
grabPhysicalObjectMeleeAttackSystem.damageTriggerActiveInfo newDamageTriggerActiveInfo = new grabPhysicalObjectMeleeAttackSystem.damageTriggerActiveInfo ();
damageTriggerActiveInfoList.Add (newDamageTriggerActiveInfo);
}
GUILayout.EndHorizontal ();
}
}
EditorGUILayout.EndScrollView ();
EditorGUILayout.Space ();
if (editSingleMeleeAttackInfo) {
if (GUILayout.Button ("Update Melee Attack Info")) {
if (attackListAssigned && attackInfoAssigned) {
updateMeleeAttackInfo ();
}
}
} else {
if (GUILayout.Button ("Add Melee Attack List To Character")) {
addActionSystem ();
}
}
if (GUILayout.Button ("Cancel")) {
this.Close ();
}
}
}
GUILayout.EndVertical ();
}
void showCustomPrefabPathOptions ()
{
GUILayout.BeginHorizontal ();
GUILayout.Label ("Use Custom Prefab Path", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
useCustomPrefabPath = (bool)EditorGUILayout.Toggle ("", useCustomPrefabPath);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (useCustomPrefabPath) {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Custom Prefab Path", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
customPrefabPath = EditorGUILayout.TextField ("", customPrefabPath);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Check Prefabs On New Path")) {
prefabsPath = customPrefabPath;
checkCurrentObjectSelected (Selection.activeGameObject);
}
}
}
void addActionSystem ()
{
bool checkResult = true;
if (currentActionSystemPrefab == null) {
Debug.Log ("WARNING: no prefab found on path " + prefabsPath);
checkResult = false;
}
if (mainGrabPhysicalObjectMeleeAttackSystemGameObject == null) {
if (!useMeleeWeaponAttackInfoTemplate && !addNewCustomMeleeAttack) {
Debug.Log ("WARNING: no melee weapon object assigned");
checkResult = false;
}
}
if (addNewCustomMeleeAttack && damageTriggerActiveInfoList.Count < 2) {
Debug.Log ("WARNING: make sure to configure at least 2 damage trigger elements on the list for the damage detection");
checkResult = false;
}
if (!checkResult) {
return;
}
if (addNewCustomMeleeAttack) {
grabPhysicalObjectMeleeAttackSystem.attackInfo newAttackInfo = new grabPhysicalObjectMeleeAttackSystem.attackInfo ();
newAttackInfo.attackDamage = attackDamage;
newAttackInfo.attackType = attackType;
newAttackInfo.customActionName = actionSystemAnimationName;
newAttackInfo.useCustomAction = true;
newAttackInfo.attackDuration = actionSystemDuration;
newAttackInfo.attackDurationOnAir = actionSystemDuration;
newAttackInfo.attackAnimationSpeed = actionSystemSpeed;
newAttackInfo.attackAnimationSpeedOnAir = actionSystemSpeed;
newAttackInfo.minDelayBeforeNextAttack = 1;
newAttackInfo.playerOnGroundToActivateAttack = false;
for (int i = 0; i < damageTriggerActiveInfoList.Count; i++) {
grabPhysicalObjectMeleeAttackSystem.damageTriggerActiveInfo newTriggerInfo = new grabPhysicalObjectMeleeAttackSystem.damageTriggerActiveInfo (damageTriggerActiveInfoList [i]);
newTriggerInfo.checkSurfacesWithCapsuleRaycast = true;
newTriggerInfo.checkSurfaceCapsuleRaycastRadius = 0.1f;
newAttackInfo.damageTriggerActiveInfoList.Add (newTriggerInfo);
}
if (mainGrabPhysicalObjectMeleeAttackSystemGameObject != null) {
mainGrabPhysicalObjectMeleeAttackSystem = mainGrabPhysicalObjectMeleeAttackSystemGameObject.GetComponent<grabPhysicalObjectMeleeAttackSystem> ();
if (mainGrabPhysicalObjectMeleeAttackSystem != null) {
mainGrabPhysicalObjectMeleeAttackSystem.attackInfoList.Add (newAttackInfo);
GKC_Utils.updateComponent (mainGrabPhysicalObjectMeleeAttackSystem);
GKC_Utils.updateDirtyScene ("Update Melee Weapon Info", mainGrabPhysicalObjectMeleeAttackSystemGameObject);
if (mainGrabbedObjectMeleeAttackSystem != null) {
mainGrabbedObjectMeleeAttackSystem.addEventOnDamageInfoList (mainGrabPhysicalObjectMeleeAttackSystem.weaponInfoName);
GKC_Utils.updateComponent (mainGrabbedObjectMeleeAttackSystem);
}
}
}
addAttackInfoAsActionSystem (newAttackInfo);
}
if (!addNewCustomMeleeAttack) {
List<grabPhysicalObjectMeleeAttackSystem.attackInfo> mainAttackInfoList = new List<grabPhysicalObjectMeleeAttackSystem.attackInfo> ();
if (useMeleeWeaponAttackInfoTemplate) {
mainAttackInfoList = mainMeleeWeaponAttackInfo.mainMeleeWeaponInfo.mainAttackInfoList;
} else {
if (mainGrabPhysicalObjectMeleeAttackSystemGameObject != null) {
mainGrabPhysicalObjectMeleeAttackSystem = mainGrabPhysicalObjectMeleeAttackSystemGameObject.GetComponent<grabPhysicalObjectMeleeAttackSystem> ();
if (mainGrabPhysicalObjectMeleeAttackSystem) {
mainAttackInfoList = mainGrabPhysicalObjectMeleeAttackSystem.attackInfoList;
}
}
}
for (int i = 0; i < mainAttackInfoList.Count; i++) {
grabPhysicalObjectMeleeAttackSystem.attackInfo currentAttackInfo = mainAttackInfoList [i];
addAttackInfoAsActionSystem (currentAttackInfo);
}
}
currentPlayerActionSystem.updateActionList (false);
GKC_Utils.setActiveGameObjectInEditor (currentPlayerActionSystem.gameObject);
actionAdded = true;
}
void addAttackInfoAsActionSystem (grabPhysicalObjectMeleeAttackSystem.attackInfo currentAttackInfo)
{
actionSystemName = currentAttackInfo.customActionName;
if (!currentPlayerActionSystem.checkActionSystemAlreadyExists (actionSystemName)) {
GameObject actionSystemObject = (GameObject)Instantiate (currentActionSystemPrefab, Vector3.zero, Quaternion.identity);
actionSystemDuration = currentAttackInfo.attackDuration;
actionSystemSpeed = currentAttackInfo.attackAnimationSpeed;
useActionSystemID = false;
actionSystemID = 0;
actionSystemAnimationName = actionSystemName;
actionSystemObject.name = actionSystemName;
actionSystemObject.transform.SetParent (currentPlayerActionSystem.transform);
actionSystemObject.transform.localPosition = Vector3.zero;
actionSystemObject.transform.localRotation = Quaternion.identity;
actionSystem currentActionSystem = actionSystemObject.GetComponent<actionSystem> ();
if (currentActionSystem != null) {
currentActionSystem.addNewActionFromEditor (actionSystemName, actionSystemDuration, actionSystemSpeed,
useActionSystemID, actionSystemID, actionSystemAnimationName);
bool addNewActionResult = currentPlayerActionSystem.addNewActionFromEditor (currentActionSystem,
actionSystemCategoryName, actionSystemName, false, "Sword 1 Hand");
if (addNewActionResult) {
Debug.Log ("Action System created and adjusted to character properly");
} else {
Debug.Log ("Action System not created properly, check the player action system component on the character selected");
}
}
} else {
Debug.Log (actionSystemName + " attack already configured, ignored in this case");
}
}
void updateMeleeAttackInfo ()
{
//update the attack info on the weapon attack list and in the action system of that attack
mainGrabPhysicalObjectMeleeAttackSystem.updateMeleeAttackInfo (attackListIndex, attackDamage, attackType, actionSystemAnimationName, actionSystemDuration,
actionSystemSpeed, damageTriggerActiveInfoList);
currentPlayerActionSystem.setNewInfoOnAction (actionSystemCategoryName, originalSingleAttackName, actionSystemAnimationName, actionSystemDuration, actionSystemSpeed);
GKC_Utils.setActiveGameObjectInEditor (currentPlayerActionSystem.gameObject);
if (setNewAnimationClip) {
replaceAnimationAction ();
}
actionAdded = true;
}
int numberOfLoops = 0;
public void replaceAnimationAction ()
{
#if UNITY_EDITOR
numberOfLoops = 0;
if (mainAnimator == null) {
Debug.Log ("No animator found on scene");
return;
}
bool animationStateFound = false;
UnityEditor.Animations.AnimatorController ac = mainAnimator.runtimeAnimatorController as UnityEditor.Animations.AnimatorController;
foreach (var layer in ac.layers) {
if (layer.name == animationLayerName) {
Debug.Log ("Animator Layer to check: " + layer.name);
Debug.Log ("\n\n\n");
getChildAnimatorState (originalSingleAttackName, layer.stateMachine);
Debug.Log ("\n\n\n");
if (animatorStateToReplace.state != null) {
Debug.Log ("\n\n\n");
Debug.Log ("STATE FOUND ############################################################################################");
Debug.Log ("Last animator state found " + animatorStateToReplace.state.name + " " + numberOfLoops);
if (animatorStateToReplace.state.name == originalSingleAttackName) {
animationStateFound = true;
// animatorStateToReplace.state.speed = newAnimationSpeed;
// animatorStateToReplace.state.motion = newAnimationClip;
// animatorStateToReplace.state.mirror = newAnimationIsMirror;
// animatorStateToReplace.state.AddExitTransition ();
}
}
}
}
if (animationStateFound) {
Debug.Log ("Animation State found and replaced properly");
} else {
Debug.Log ("Animation State not found");
}
#endif
}
#if UNITY_EDITOR
UnityEditor.Animations.ChildAnimatorState animatorStateToReplace;
public void getChildAnimatorState (string stateName, UnityEditor.Animations.AnimatorStateMachine stateMachine)
{
Debug.Log ("State Machine to check: " + stateMachine.name + " " + stateMachine.stateMachines.Length);
if (stateMachine.stateMachines.Length > 0) {
foreach (var currentStateMachine in stateMachine.stateMachines) {
numberOfLoops++;
if (numberOfLoops > 3000) {
Debug.Log ("number of loops too big");
return;
}
getChildAnimatorState (stateName, currentStateMachine.stateMachine);
}
} else {
foreach (var currentState in stateMachine.states) {
if (currentState.state.name == stateName) {
animatorStateToReplace = currentState;
}
}
}
}
#endif
void Update ()
{
if (actionAdded) {
if (timer < timeToBuild) {
timer += 0.01f;
if (timer > timeToBuild) {
timer = 0;
this.Close ();
}
}
}
}
}
#endif

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 995f5a1ebebdc784ba99cfc0336bc4c2
timeCreated: 1703835081
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/AddNewMeleeAttackActionSystemToCharacterCreatorEditor.cs.bak
uploadId: 814740

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: e8da825b2f4c0974b8404633dfabc6ce
timeCreated: 1657660856
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/AddNewMeleeAttackActionSystemToCharacterCreatorEditor.cs
uploadId: 814740

View File

@@ -0,0 +1,389 @@
using UnityEngine;
using System.Collections;
#if UNITY_EDITOR
using UnityEditor;
[CustomEditor (typeof(BezierSpline))]
public class BezierSplineEditor : Editor
{
SerializedProperty directionScale;
SerializedProperty newPointOffset;
SerializedProperty newPointBezierOffset;
SerializedProperty points;
SerializedProperty modes;
SerializedProperty lookDirectionList;
SerializedProperty handleSize;
SerializedProperty pickSize;
SerializedProperty showGizmo;
SerializedProperty showLookDirectionGizmo;
SerializedProperty lookDirectionGizmoRadius;
SerializedProperty lookDirectionArrowLength;
GUIStyle buttonStyle = new GUIStyle ();
private const int stepsPerCurve = 10;
private static Color[] modeColors = {
Color.green,
Color.white,
Color.cyan
};
Color mainPointColor = Color.red;
private BezierSpline spline;
private Transform handleTransform;
private Quaternion handleRotation;
void OnEnable ()
{
directionScale = serializedObject.FindProperty ("directionScale");
newPointOffset = serializedObject.FindProperty ("newPointOffset");
newPointBezierOffset = serializedObject.FindProperty ("newPointBezierOffset");
points = serializedObject.FindProperty ("points");
modes = serializedObject.FindProperty ("modes");
lookDirectionList = serializedObject.FindProperty ("lookDirectionList");
handleSize = serializedObject.FindProperty ("handleSize");
pickSize = serializedObject.FindProperty ("pickSize");
showGizmo = serializedObject.FindProperty("showGizmo");
showLookDirectionGizmo = serializedObject.FindProperty ("showLookDirectionGizmo");
lookDirectionGizmoRadius = serializedObject.FindProperty ("lookDirectionGizmoRadius");
lookDirectionArrowLength = serializedObject.FindProperty ("lookDirectionArrowLength");
spline = (BezierSpline)target;
if (spline.points.Count == 0) {
spline.Reset ();
}
//spline.Reset ();
}
public override void OnInspectorGUI ()
{
EditorGUI.BeginChangeCheck ();
EditorGUILayout.Space ();
buttonStyle = new GUIStyle (GUI.skin.button);
buttonStyle.fontStyle = FontStyle.Bold;
buttonStyle.fontSize = 12;
GUILayout.BeginVertical ("Main Settings", "window");
EditorGUILayout.PropertyField (directionScale);
EditorGUILayout.PropertyField (newPointOffset);
EditorGUILayout.PropertyField (newPointBezierOffset);
if (spline.points.Count > 4) {
bool loop = EditorGUILayout.Toggle ("Loop", spline.Loop);
if (EditorGUI.EndChangeCheck ()) {
Undo.RecordObject (spline, "Toggle Loop");
EditorUtility.SetDirty (spline);
spline.Loop = loop;
}
}
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Spline State", "window");
GUILayout.Label ("Selected Index\t " + spline.selectedIndex);
GUILayout.Label ("Number Of Points\t " + ((Mathf.Round (spline.points.Count / 3)) + 1));
GUILayout.EndVertical ();
EditorGUILayout.Space ();
if (spline.points.Count > 0 && spline.selectedIndex > -1) {
GUILayout.BeginVertical ("Point State", "window");
GUILayout.Label ("Selected Point");
EditorGUI.BeginChangeCheck ();
Vector3 point = EditorGUILayout.Vector3Field ("Position", spline.GetControlPoint (spline.selectedIndex));
if (EditorGUI.EndChangeCheck ()) {
Undo.RecordObject (spline, "Move Point");
EditorUtility.SetDirty (spline);
spline.SetControlPoint (spline.selectedIndex, point);
}
EditorGUI.BeginChangeCheck ();
BezierSpline.BezierControlPointMode mode = (BezierSpline.BezierControlPointMode)EditorGUILayout.EnumPopup ("Mode", spline.GetControlPointMode (spline.selectedIndex));
if (EditorGUI.EndChangeCheck ()) {
Undo.RecordObject (spline, "Change Point Mode");
spline.SetControlPointMode (spline.selectedIndex, mode);
EditorUtility.SetDirty (spline);
}
GUILayout.EndVertical ();
EditorGUILayout.Space ();
}
if (GUILayout.Button ("Add Curve")) {
spline.AddCurve (spline.points.Count, true);
}
if (GUILayout.Button ("x")) {
spline.removeCurve (spline.selectedIndex);
}
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Point List", "window", GUILayout.Height (30));
showPointList (points);
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Mode List", "window", GUILayout.Height (30));
showModeList (modes);
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Look Direction List", "window", GUILayout.Height (30));
showLookDirectionList (lookDirectionList);
if (GUILayout.Button ("Align Look Direction With Spline Points (Pos and Rot)")) {
spline.alignLookDirection (true);
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Align Look Direction With Spline Points (Pos)")) {
spline.alignLookDirection (false);
}
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Gizmo Settings", "window");
EditorGUILayout.PropertyField (handleSize);
EditorGUILayout.PropertyField (pickSize);
EditorGUILayout.PropertyField (showGizmo);
EditorGUILayout.PropertyField (showLookDirectionGizmo);
EditorGUILayout.PropertyField (lookDirectionGizmoRadius);
EditorGUILayout.PropertyField (lookDirectionArrowLength);
GUILayout.EndVertical ();
EditorGUILayout.Space ();
if (GUI.changed) {
serializedObject.ApplyModifiedProperties ();
}
}
private void OnSceneGUI ()
{
if (spline.showGizmo) {
spline = target as BezierSpline;
handleTransform = spline.transform;
handleRotation = Tools.pivotRotation == PivotRotation.Local ? handleTransform.rotation : Quaternion.identity;
Vector3 p0 = ShowPoint (0);
for (int i = 1; i < spline.ControlPointCount; i += 3) {
Vector3 p1 = ShowPoint (i);
Vector3 p2 = ShowPoint (i + 1);
Vector3 p3 = ShowPoint (i + 2);
Handles.color = Color.gray;
Handles.DrawLine (p0, p1);
Handles.DrawLine (p2, p3);
Handles.DrawBezier (p0, p3, p1, p2, Color.white, null, 2f);
p0 = p3;
}
ShowDirections ();
}
}
private void ShowDirections ()
{
Handles.color = Color.green;
Vector3 point = spline.GetPoint (0f);
Handles.DrawLine (point, point + spline.GetDirection (0f) * spline.directionScale);
int steps = stepsPerCurve * spline.CurveCount;
for (int i = 1; i <= steps; i++) {
point = spline.GetPoint (i / (float)steps);
Handles.DrawLine (point, point + spline.GetDirection (i / (float)steps) * spline.directionScale);
}
}
private Vector3 ShowPoint (int index)
{
Vector3 point = handleTransform.TransformPoint (spline.GetControlPoint (index));
float size = HandleUtility.GetHandleSize (point);
if (index == 0) {
size *= 2f;
}
Handles.color = modeColors [(int)spline.GetControlPointMode (index)];
if (index % 3 == 0) {
Handles.color = mainPointColor;
}
if (Handles.Button (point, handleRotation, size * spline.handleSize, size * spline.pickSize, Handles.DotHandleCap)) {
spline.selectedIndex = index;
Repaint ();
}
if (spline.selectedIndex == index) {
EditorGUI.BeginChangeCheck ();
point = Handles.DoPositionHandle (point, handleRotation);
if (EditorGUI.EndChangeCheck ()) {
Undo.RecordObject (spline, "Move Point");
EditorUtility.SetDirty (spline);
spline.SetControlPoint (index, handleTransform.InverseTransformPoint (point));
}
}
return point;
}
void showPointList (SerializedProperty list)
{
EditorGUILayout.Space ();
if (GUILayout.Button ("Show/Hide " + list.displayName, buttonStyle)) {
list.isExpanded = !list.isExpanded;
}
EditorGUILayout.Space ();
if (list.isExpanded) {
GUILayout.BeginVertical ("box");
EditorGUILayout.Space ();
GUILayout.Label ("Number Of Points: \t" + list.arraySize);
EditorGUILayout.Space ();
for (int i = 0; i < list.arraySize; i++) {
GUILayout.BeginHorizontal ();
if (i < list.arraySize && i >= 0) {
GUILayout.Label ((i.ToString ()));
GUILayout.Label ((list.GetArrayElementAtIndex (i).vector3Value).ToString ());
}
if (GUILayout.Button ("o")) {
spline.setSelectedIndex (i);
}
if (i % 3 == 0) {
if (GUILayout.Button ("x")) {
spline.removeCurve (i);
}
if (GUILayout.Button ("+")) {
spline.AddCurve (i + 1, false);
}
}
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
}
GUILayout.EndVertical ();
}
}
void showModeList (SerializedProperty list)
{
EditorGUILayout.Space ();
if (GUILayout.Button ("Show/Hide " + list.displayName, buttonStyle)) {
list.isExpanded = !list.isExpanded;
}
EditorGUILayout.Space ();
if (list.isExpanded) {
GUILayout.BeginVertical ("box");
EditorGUILayout.Space ();
GUILayout.Label ("Number Of Modes: \t" + list.arraySize);
EditorGUILayout.Space ();
for (int i = 0; i < list.arraySize; i++) {
GUILayout.BeginHorizontal ();
if (i < list.arraySize && i >= 0) {
EditorGUILayout.PropertyField (list.GetArrayElementAtIndex (i), new GUIContent ("", null, ""), false);
}
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
}
GUILayout.EndVertical ();
}
}
void showLookDirectionList (SerializedProperty list)
{
EditorGUILayout.Space ();
if (GUILayout.Button ("Show/Hide " + list.displayName, buttonStyle)) {
list.isExpanded = !list.isExpanded;
}
EditorGUILayout.Space ();
if (list.isExpanded) {
GUILayout.BeginVertical ("box");
EditorGUILayout.Space ();
GUILayout.Label ("Number Of Directions: \t" + list.arraySize);
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("Add Direction")) {
list.arraySize++;
}
if (GUILayout.Button ("Clear List")) {
list.arraySize = 0;
}
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
for (int i = 0; i < list.arraySize; i++) {
GUILayout.BeginVertical ();
GUILayout.BeginHorizontal ("box");
if (i < list.arraySize && i >= 0) {
EditorGUILayout.PropertyField (list.GetArrayElementAtIndex (i), new GUIContent ("", null, ""), false);
}
if (GUILayout.Button ("x")) {
list.DeleteArrayElementAtIndex (i);
list.DeleteArrayElementAtIndex (i);
}
if (GUILayout.Button ("v")) {
if (i >= 0) {
list.MoveArrayElement (i, i + 1);
}
}
if (GUILayout.Button ("^")) {
if (i < list.arraySize) {
list.MoveArrayElement (i, i - 1);
}
}
GUILayout.EndHorizontal ();
GUILayout.EndVertical ();
}
EditorGUILayout.Space ();
GUILayout.EndVertical ();
}
}
}
#endif

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 7e2025fcdd30f424d8b90271db3d0d01
timeCreated: 1560380155
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/BezierSplineEditor.cs
uploadId: 814740

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 0151ff9df559ba646bc068ad34b05d45
timeCreated: 1493924607
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/CharacterCreatorEditor.cs
uploadId: 814740

View File

@@ -0,0 +1,50 @@
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
using UnityEditorInternal;
using System;
public static class CollapseInspectorEditor
{
[MenuItem ("CONTEXT/Component/Collapse All")]
private static void CollapseAll (MenuCommand command)
{
SetAllInspectorsExpanded ((command.context as Component).gameObject, false);
}
[MenuItem ("CONTEXT/Component/Expand All")]
private static void ExpandAll (MenuCommand command)
{
SetAllInspectorsExpanded ((command.context as Component).gameObject, true);
}
public static void SetAllInspectorsExpanded (GameObject go, bool expanded)
{
Component[] components = go.GetComponents<Component> ();
foreach (Component component in components) {
if (component is Renderer) {
var mats = ((Renderer)component).sharedMaterials;
for (int i = 0; i < mats.Length; ++i) {
InternalEditorUtility.SetIsInspectorExpanded (mats [i], expanded);
}
}
InternalEditorUtility.SetIsInspectorExpanded (component, expanded);
}
ActiveEditorTracker.sharedTracker.ForceRebuild ();
}
public static void CollapseAllComponentsButOne (GameObject go, Type componentToCheck)
{
SetAllInspectorsExpanded (go, false);
Component componentToSearch = go.GetComponent (componentToCheck);
if (componentToSearch != null) {
InternalEditorUtility.SetIsInspectorExpanded (componentToSearch, true);
ActiveEditorTracker.sharedTracker.ForceRebuild ();
}
}
}
#endif

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 1572a2e47fffafc4288872f1c11020db
timeCreated: 1560205417
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/CollapseInspectorEditor.cs
uploadId: 814740

View File

@@ -0,0 +1,130 @@
using System.IO;
using System.Linq;
using UnityEditor;
using UnityEngine;
public sealed class CustomizableToolbar : EditorWindow, IHasCustomMenu
{
private const string TITLE = "GKC Toolbar";
private static float WINDOW_HEIGHT = 40;
private const float BUTTON_HEIGHT = 20;
private CustomizableToolbarSettings m_settings;
public static CustomizableToolbar Instance { get; private set; }
[MenuItem ("Game Kit Controller/Show GKC Toolbar", false, 502)]
private static void Init ()
{
var win = GetWindow<CustomizableToolbar> (TITLE);
var pos = win.position;
pos.height = WINDOW_HEIGHT;
win.position = pos;
var minSize = win.minSize;
minSize.y = WINDOW_HEIGHT;
win.minSize = minSize;
var maxSize = win.maxSize;
maxSize.y = WINDOW_HEIGHT;
win.maxSize = maxSize;
}
private void OnGUI ()
{
EditorGUILayout.BeginVertical ();
var list = m_settings.List.Where (c => c.IsValid);
int numberOfColumns = m_settings.numberOfColumns;
int currentIndex = 0;
int numberOfElements = m_settings.List.Count;
foreach (var n in list) {
if (currentIndex == 0) {
EditorGUILayout.BeginHorizontal ();
}
var commandName = n.CommandName;
var buttonName = n.ButtonName;
var useImage = n.useImage;
var image = n.Image;
var width = n.Width;
var hint = n.hint;
var content = useImage ? new GUIContent (image, hint) : new GUIContent (buttonName, hint);
var options = 0 < width
? new [] { GUILayout.Width (width), GUILayout.Height (BUTTON_HEIGHT) }
: new [] {
GUILayout.Width (EditorStyles.label.CalcSize (new GUIContent (buttonName)).x + 14),
GUILayout.Height (BUTTON_HEIGHT)
};
if (GUILayout.Button (content, options)) {
string commandCheck = commandName;
commandCheck = commandCheck.Replace (" ", "");
if (commandCheck != "") {
EditorApplication.ExecuteMenuItem (commandName);
}
}
currentIndex++;
if (currentIndex % numberOfColumns == 0 && currentIndex != numberOfElements) {
EditorGUILayout.EndHorizontal ();
EditorGUILayout.BeginHorizontal ();
}
if (currentIndex == numberOfElements) {
EditorGUILayout.EndHorizontal ();
}
}
EditorGUILayout.EndVertical ();
}
private void OnEnable ()
{
var mono = MonoScript.FromScriptableObject (this);
var scriptPath = AssetDatabase.GetAssetPath (mono);
var dir = Path.GetDirectoryName (scriptPath);
var path = string.Format ("{0}/Settings.asset", dir);
m_settings = AssetDatabase.LoadAssetAtPath<CustomizableToolbarSettings> (path);
WINDOW_HEIGHT = m_settings.windowsHeight;
if (WINDOW_HEIGHT == 0) {
WINDOW_HEIGHT = 30;
}
Instance = this;
}
public static void updateToolBarValues ()
{
if (Instance != null) {
Instance.Repaint ();
} else {
Init ();
}
}
public void AddItemsToMenu (GenericMenu menu)
{
menu.AddItem
(
new GUIContent ("Settings"),
false,
() => EditorGUIUtility.PingObject (m_settings)
);
}
}

View File

@@ -0,0 +1,20 @@
fileFormatVersion: 2
guid: 684f9960a4d077a479ac70ed11eaea67
timeCreated: 1520990524
licenseType: Store
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/CustomizableToolbar.cs
uploadId: 814740

View File

@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using UnityEngine;
[Serializable]
public sealed class CustomizableToolbarSettingsData
{
[SerializeField] private string m_commandName = null;
[SerializeField] private string m_buttonName = null;
[SerializeField] private bool m_useImage = false;
[SerializeField] private Texture m_image = null;
[SerializeField] private int m_width = 0;
[SerializeField] private string m_hint = null;
public string CommandName { get { return m_commandName; } }
public string ButtonName { get { return m_buttonName; } }
public bool useImage { get { return m_useImage; } }
public Texture Image { get { return m_image; } }
public int Width { get { return m_width; } }
public string hint { get { return m_hint; } }
public bool IsValid { get { return !string.IsNullOrEmpty (m_commandName); } }
}
public sealed class CustomizableToolbarSettings : ScriptableObject
{
[SerializeField] private CustomizableToolbarSettingsData[] m_list = null;
public int numberOfColumns = 23;
public float windowsHeight = 50;
public IList<CustomizableToolbarSettingsData> List { get { return m_list; } }
}

View File

@@ -0,0 +1,20 @@
fileFormatVersion: 2
guid: 957cf821b97e0f5438c9f3a087349e1c
timeCreated: 1520991259
licenseType: Store
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/CustomizableToolbarSettings.cs
uploadId: 814740

View File

@@ -0,0 +1,518 @@
using System.IO;
using UnityEditor;
using UnityEngine;
[CustomPropertyDrawer (typeof(CustomizableToolbarSettingsData))]
public sealed class CustomizableToolbarSettingsDataDrawer : PropertyDrawer
{
public override void OnGUI (Rect position, SerializedProperty property, GUIContent label)
{
using (new EditorGUI.PropertyScope (position, label, property)) {
position.height = EditorGUIUtility.singleLineHeight;
var commandRect = new Rect (position) {
width = position.width - 18,
};
var presetRect = new Rect (position) {
x = commandRect.xMax + 2,
width = 16,
};
var useImageRect = new Rect (position) {
y = presetRect.yMax + 2,
};
var buttonRect = new Rect (position) {
y = useImageRect.yMax + 2,
};
var imageRect = new Rect (position) {
y = buttonRect.yMax + 2,
};
var widthRect = new Rect (position) {
y = imageRect.yMax + 2,
};
var hintRect = new Rect (position) {
y = widthRect.yMax + 2,
};
var commandProperty = property.FindPropertyRelative ("m_commandName");
var buttonProperty = property.FindPropertyRelative ("m_buttonName");
var useImageProperty = property.FindPropertyRelative ("m_useImage");
var imageProperty = property.FindPropertyRelative ("m_image");
var widthProperty = property.FindPropertyRelative ("m_width");
var hintProperty = property.FindPropertyRelative ("m_hint");
commandProperty.stringValue = EditorGUI.TextField (commandRect, commandProperty.displayName, commandProperty.stringValue);
buttonProperty.stringValue = EditorGUI.TextField (buttonRect, buttonProperty.displayName, buttonProperty.stringValue);
useImageProperty.boolValue = EditorGUI.Toggle (useImageRect, useImageProperty.displayName, useImageProperty.boolValue);
EditorGUI.ObjectField (imageRect, imageProperty);
widthProperty.intValue = EditorGUI.IntField (widthRect, widthProperty.displayName, widthProperty.intValue);
hintProperty.stringValue = EditorGUI.TextField (hintRect, hintProperty.displayName, hintProperty.stringValue);
if (GUI.Button (presetRect, GUIContent.none, "ShurikenDropdown")) {
var menu = new GenericMenu ();
foreach (var n in PRESETS) {
menu.AddItem (new GUIContent (n), false, () => {
property.serializedObject.Update ();
commandProperty.stringValue = n;
buttonProperty.stringValue = Path.GetFileNameWithoutExtension (n);
property.serializedObject.ApplyModifiedProperties ();
});
}
menu.ShowAsContext ();
}
}
}
private static readonly string[] PRESETS = {
"File/New Scene",
"File/Open Scene",
"File/Save Scenes",
"File/Save Scenes as...",
"File/New Project...",
"File/Open Project...",
"File/Save Project",
"File/Build Settings...",
"File/Build & Run",
"File/Exit",
"Edit/Undo",
"Edit/Redo",
"Edit/Cut",
"Edit/Copy",
"Edit/Paste",
"Edit/Duplicate",
"Edit/Delete",
"Edit/Frame Selected",
"Edit/Find",
"Edit/Select All",
"Edit/Preferences...",
"Edit/Modules...",
"Edit/Play",
"Edit/Pause",
"Edit/Step",
"Edit/Sign in...",
"Edit/Sign out",
"Edit/Selection/Load Selection 1",
"Edit/Selection/Load Selection 2",
"Edit/Selection/Load Selection 3",
"Edit/Selection/Load Selection 4",
"Edit/Selection/Load Selection 5",
"Edit/Selection/Load Selection 6",
"Edit/Selection/Load Selection 7",
"Edit/Selection/Load Selection 8",
"Edit/Selection/Load Selection 9",
"Edit/Selection/Load Selection 0",
"Edit/Selection/Save Selection 1",
"Edit/Selection/Save Selection 2",
"Edit/Selection/Save Selection 3",
"Edit/Selection/Save Selection 4",
"Edit/Selection/Save Selection 5",
"Edit/Selection/Save Selection 6",
"Edit/Selection/Save Selection 7",
"Edit/Selection/Save Selection 8",
"Edit/Selection/Save Selection 9",
"Edit/Selection/Save Selection 0",
"Edit/Project Settings/Input",
"Edit/Project Settings/Tags and Layers",
"Edit/Project Settings/Audio",
"Edit/Project Settings/Time",
"Edit/Project Settings/Player",
"Edit/Project Settings/Physics",
"Edit/Project Settings/Physics 2D",
"Edit/Project Settings/Quality",
"Edit/Project Settings/Graphics",
"Edit/Project Settings/Network",
"Edit/Project Settings/Editor",
"Edit/Project Settings/Script Execution Order",
"Edit/Graphics Emulation/No Emulation",
"Edit/Graphics Emulation/Saher Mode 4",
"Edit/Graphics Emulation/Saher Mode 3",
"Edit/Graphics Emulation/Saher Mode 2",
"Edit/Graphics Emulation/Saher Hardware Tier 1",
"Edit/Graphics Emulation/Saher Hardware Tier 2",
"Edit/Graphics Emulation/Saher Hardware Tier 3",
"Edit/Newtwork Emulation/None",
"Edit/Newtwork Emulation/Broadband",
"Edit/Newtwork Emulation/DSL",
"Edit/Newtwork Emulation/ISDN",
"Edit/Newtwork Emulation/Dial-Up",
"Edit/Snap Settings...",
"Assets/Create/Folder",
"Assets/Create/C# Script",
"Assets/Create/Shader/Standard Surface Shader",
"Assets/Create/Shader/Unlit Shader",
"Assets/Create/Shader/Image Effect Shader",
"Assets/Create/Shader/Compute Shader",
"Assets/Create/Shader/Shader Variant Collection",
"Assets/Create/Testing/EditMode Test C# Script",
"Assets/Create/Testing/PlayMode test C# Script",
"Assets/Create/Playables/Playable Behaviour C# Script",
"Assets/Create/Playables/Playable Asset C# Script",
"Assets/Create/Assembly Definition",
"Assets/Create/Scene",
"Assets/Create/Prefab",
"Assets/Create/Audio Mixer",
"Assets/Create/Material",
"Assets/Create/Lens Flare",
"Assets/Create/Render Texture",
"Assets/Create/Lightmap Parameters",
"Assets/Create/Custom Render Texture",
"Assets/Create/Sprite Atlas",
"Assets/Create/Sprites/Square",
"Assets/Create/Sprites/Triangle",
"Assets/Create/Sprites/Diamond",
"Assets/Create/Sprites/Hexagon",
"Assets/Create/Sprites/Circle",
"Assets/Create/Sprites/Polygon",
"Assets/Create/Tile",
"Assets/Create/Animator Controller",
"Assets/Create/Animation",
"Assets/Create/Animator Override Controller",
"Assets/Create/Avatar Mask",
"Assets/Create/Timeline",
"Assets/Create/Physic Material",
"Assets/Create/Physics Material 2D",
"Assets/Create/GUI Skin",
"Assets/Create/Custom Font",
"Assets/Create/Legacy/Cubemap",
"Assets/Create/Legacy/UnityScript (deprecated)",
"Assets/Create/UIElements View",
"Assets/Show in Explorer",
"Assets/Open",
"Assets/Delete",
"Assets/Open Scene Additive",
"Assets/Import New Asset...",
"Assets/Import Package/Custom Package...",
"Assets/Export Package...",
"Assets/Find References In Scene",
"Assets/Select Dependencies",
"Assets/Refresh",
"Assets/Reimport",
"Assets/Reimport All",
"Assets/Extract From Prefab",
"Assets/Run API Updater...",
"Assets/Open C# Project",
"GameObject/Create Empty",
"GameObject/Create Empty Child",
"GameObject/3D Object/Cube",
"GameObject/3D Object/Sphere",
"GameObject/3D Object/Capsule",
"GameObject/3D Object/Cylinder",
"GameObject/3D Object/Plane",
"GameObject/3D Object/Quad",
"GameObject/3D Object/Ragdoll...",
"GameObject/3D Object/Terrain",
"GameObject/3D Object/Tree",
"GameObject/3D Object/Wind Zone",
"GameObject/3D Object/3D Text",
"GameObject/2D Object/Sprite",
"GameObject/2D Object/Tilemap",
"GameObject/2D Object/Sprite Mask",
"GameObject/Effects/Particle System",
"GameObject/Effects/Trail",
"GameObject/Effects/Line",
"GameObject/Light/Directional Light",
"GameObject/Light/Point Light",
"GameObject/Light/Spotlight",
"GameObject/Light/Area Light",
"GameObject/Light/Reflection Probe",
"GameObject/Light/Light Probe Group",
"GameObject/Audio/Audio Source",
"GameObject/Audio/Audio Reverb Zone",
"GameObject/Video/Video Player",
"GameObject/UI/Text",
"GameObject/UI/Image",
"GameObject/UI/Raw Image",
"GameObject/UI/Button",
"GameObject/UI/Toggle",
"GameObject/UI/Slider",
"GameObject/UI/Scrollbar",
"GameObject/UI/Dropdown",
"GameObject/UI/Input Field",
"GameObject/UI/Canvas",
"GameObject/UI/Panel",
"GameObject/UI/Scroll View",
"GameObject/UI/Event System",
"GameObject/Camera",
"GameObject/Center On Children",
"GameObject/Make Parent",
"GameObject/Clear Parent",
"GameObject/Apply Changes To Prefab",
"GameObject/Break Prefab Instance",
"GameObject/Set as first sibling",
"GameObject/Set as last sibling",
"GameObject/Move To View",
"GameObject/Align With View",
"GameObject/Align View to Selected",
"GameObject/Toggle Active State",
"Component/Add",
"Component/Mesh/Mesh Filter",
"Component/Mesh/Text Mesh",
"Component/Mesh/Mesh Renderer",
"Component/Mesh/Skinned Mesh Renderer",
"Component/Effects/Particle System",
"Component/Effects/Trail Renderer",
"Component/Effects/Line Renderer",
"Component/Effects/Lens Flare",
"Component/Effects/Halo",
"Component/Effects/Projector",
"Component/Effects/Legacy Particles/Ellipsoid Particle Emitter",
"Component/Effects/Legacy Particles/Mesh Particle Emitter",
"Component/Effects/Legacy Particles/Particle Animator",
"Component/Effects/Legacy Particles/World Particle Collider",
"Component/Effects/Legacy Particles/Particle Renderer",
"Component/Physics/Rigidbody",
"Component/Physics/Character Controller",
"Component/Physics/Box Collider",
"Component/Physics/Sphere Collider",
"Component/Physics/Capsule Collider",
"Component/Physics/Mesh Collider",
"Component/Physics/Wheel Collider",
"Component/Physics/Terrain Collider",
"Component/Physics/Cloth",
"Component/Physics/Hinge Joint",
"Component/Physics/Fixed Joint",
"Component/Physics/Spring Joint",
"Component/Physics/Character Joint",
"Component/Physics/Configurable Joint",
"Component/Physics/Constant Force",
"Component/Physics 2D/Rigidbody 2D",
"Component/Physics 2D/Box Collider 2D",
"Component/Physics 2D/Circle Collider 2D",
"Component/Physics 2D/Edge Collider 2D",
"Component/Physics 2D/Polygon Collider 2D",
"Component/Physics 2D/Capsule Collider 2D",
"Component/Physics 2D/Composite Collider 2D",
"Component/Physics 2D/Distance Joint 2D",
"Component/Physics 2D/Fixed Joint 2D",
"Component/Physics 2D/Friction Joint 2D",
"Component/Physics 2D/Hinge Joint 2D",
"Component/Physics 2D/Relative Joint 2D",
"Component/Physics 2D/Slider Joint 2D",
"Component/Physics 2D/Spring Joint 2D",
"Component/Physics 2D/Target Joint 2D",
"Component/Physics 2D/Wheel Joint 2D",
"Component/Physics 2D/Area Effector 2D",
"Component/Physics 2D/Buoyancy Effector 2D",
"Component/Physics 2D/Point Effector 2D",
"Component/Physics 2D/Platform Effector 2D",
"Component/Physics 2D/Surface Effector 2D",
"Component/Physics 2D/Constant Force 2D",
"Component/Navigation/Nav Mesh Agent",
"Component/Navigation/Off Mesh Link",
"Component/Navigation/Nav Mesh Obstacle",
"Component/Audio/Audio Listener",
"Component/Audio/Audio Source",
"Component/Audio/Audio Reverb Zone",
"Component/Audio/Audio Low Pass Filter",
"Component/Audio/Audio High Pass Filter",
"Component/Audio/Audio Echo Filter",
"Component/Audio/Audio Distorition Filter",
"Component/Audio/Audio Reverb Filter",
"Component/Audio/Audio Chorus Filter",
"Component/Audio/Audio Spatializer/Audio Spatializer Microsoft",
"Component/Video/Video Player",
"Component/Rendering/Camera",
"Component/Rendering/Skybox",
"Component/Rendering/Flare Layer",
"Component/Rendering/GUI Layer",
"Component/Rendering/Light",
"Component/Rendering/Light Probe Group",
"Component/Rendering/Light Probe Proxy Volume",
"Component/Rendering/Reflection Probe",
"Component/Rendering/Occlusion Area",
"Component/Rendering/Occlusion Prtal",
"Component/Rendering/LOD Group",
"Component/Rendering/Sprite Renderer",
"Component/Rendering/Sorting Group",
"Component/Rendering/Canvas Renderer",
"Component/Rendering/GUI Texture",
"Component/Rendering/GUI Text",
"Component/Tilemap/Tilemap",
"Component/Tilemap/Tilemap Renderer",
"Component/Tilemap/Tilemap Collider 2D",
"Component/Layout/Rect Transform",
"Component/Layout/Canvas",
"Component/Layout/Canvas Group",
"Component/Layout/Canvas Scaler",
"Component/Layout/Layout element",
"Component/Layout/Content Size Fitter",
"Component/Layout/Aspect Ratio Fitter",
"Component/Layout/Horizontal Layout Group",
"Component/Layout/Vertical Layout Group",
"Component/Layout/Grid Layout Group",
"Component/Layout/",
"Component/Layout/",
"Component/Layout/",
"Component/Layout/",
"Component/Playables/Playable Director",
"Component/AR/World Anchor",
"Component/Miscellaneous/Billboard Renderer",
"Component/Miscellaneous/Network View",
"Component/Miscellaneous/Terrain",
"Component/Miscellaneous/Animator",
"Component/Miscellaneous/Animation",
"Component/Miscellaneous/Grid",
"Component/Miscellaneous/Wind Zone",
"Component/Miscellaneous/Sprite Mask",
"Component/Analytics/Analytics Event Tracker",
"Component/Analytics/AnalyticsTracker",
"Component/Scripts/UnityEngine.EventSystems/Base Input",
"Component/Scripts/UnityEngine.EventSystems/Holo Lens Input",
"Component/Event/Event System",
"Component/Event/Event Trigger",
"Component/Event/HoloLens Input Module",
"Component/Event/Physics 2D Raycaster",
"Component/Event/Physics Raycaster",
"Component/Event/Standalone Input Module",
"Component/Event/Touch Input Module",
"Component/Event/Graphic Raycaster",
"Component/Network/NetworkAnimator",
"Component/Network/NetworkDiscovery",
"Component/Network/NetworkIdentity",
"Component/Network/NetworkLobbyManager",
"Component/Network/NetworkLobbyPlayer",
"Component/Network/NetworkManager",
"Component/Network/NetworkManagerHUD",
"Component/Network/NetworkMigrationManager",
"Component/Network/NetworkProximityChecker",
"Component/Network/NetworkStartPosition",
"Component/Network/NetworkTransform",
"Component/Network/NetworkTransformChild",
"Component/Network/NetworkTransformVisualizer",
"Component/XR/Tracked Pose Driver",
"Component/XR/Spatial Mapping Collider",
"Component/XR/Spatial Mapping Renderer",
"Component/UI/Effects/Shadow",
"Component/UI/Effects/Outline",
"Component/UI/Effects/Position As UV1",
"Component/UI/Text",
"Component/UI/Image",
"Component/UI/Raw Image",
"Component/UI/Mask",
"Component/UI/Rect Mask 2D",
"Component/UI/Button",
"Component/UI/Input Field",
"Component/UI/Toggle",
"Component/UI/Toggle Group",
"Component/UI/Slider",
"Component/UI/Scrollbar",
"Component/UI/Dropdown",
"Component/UI/Scroll Rect",
"Component/UI/Selectable",
"Window/Next Window",
"Window/Previous Window",
"Window/Layouts/2 by 3",
"Window/Layouts/4 Split",
"Window/Layouts/Default",
"Window/Layouts/Tall",
"Window/Layouts/Wide",
"Window/Layouts/Save Layout...",
"Window/Layouts/Delete Layout...",
"Window/Layouts/Revert Factory Settings...",
"Window/Services",
"Window/Scene",
"Window/Game",
"Window/Inspector",
"Window/Hierarchy",
"Window/Project",
"Window/Animation",
"Window/Profiler",
"Window/Audio Mixer",
"Window/Asset Store",
"Window/Version Control",
"Window/Collab History",
"Window/Animator",
"Window/Animator Parameter",
"Window/Sprite Packer",
"Window/Experimental/Look Dev",
"Window/Holographic Emulation",
"Window/Tile Pallet",
"Window/Test Runner",
"Window/Timeline",
"Window/Lighting/Settings",
"Window/Lighting/Light Explorer",
"Window/Occlusion Culling",
"Window/Frame Debugger",
"Window/Navigation",
"Window/Physics Debugger",
"Window/Console",
"Help/About Unity...",
"Help/Manage License...",
"Help/Unity Manual",
"Help/Scripting Reference",
"Help/Unity Services",
"Help/Unity Forum",
"Help/Unity Answers",
"Help/Unity Feedback",
"Help/Check for Updates",
"Help/Download Beta...",
"Help/Release Notes",
"Help/Software Licenses",
"Help/Report a Bug...",
"Help/Troubleshoot Issue...",
};
}

View File

@@ -0,0 +1,20 @@
fileFormatVersion: 2
guid: b246069f10ed04d4ea2cb8abf9558046
timeCreated: 1520992931
licenseType: Store
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/CustomizableToolbarSettingsDataDrawer.cs
uploadId: 814740

View File

@@ -0,0 +1,56 @@
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
[CustomEditor (typeof(CustomizableToolbarSettings))]
public class CustomizableToolbarSettingsInspector : Editor
{
private SerializedProperty m_property;
private ReorderableList m_reorderableList;
SerializedProperty numberOfColumns;
SerializedProperty windowsHeight;
void OnEnable ()
{
m_property = serializedObject.FindProperty ("m_list");
m_reorderableList = new ReorderableList (serializedObject, m_property) {
elementHeight = 120,
drawElementCallback = OnDrawElement
};
numberOfColumns = serializedObject.FindProperty ("numberOfColumns");
windowsHeight = serializedObject.FindProperty ("windowsHeight");
}
private void OnDrawElement (Rect rect, int index, bool isActive, bool isFocused)
{
var element = m_property.GetArrayElementAtIndex (index);
rect.height -= 4;
rect.y += 2;
EditorGUI.PropertyField (rect, element);
}
public override void OnInspectorGUI ()
{
serializedObject.Update ();
EditorGUILayout.PropertyField (numberOfColumns);
EditorGUILayout.PropertyField (windowsHeight);
EditorGUILayout.Space ();
if (GUILayout.Button (new GUIContent ("Update Values"))) {
CustomizableToolbar.updateToolBarValues ();
}
EditorGUILayout.Space ();
EditorGUILayout.Space ();
m_reorderableList.DoLayoutList ();
serializedObject.ApplyModifiedProperties ();
}
}

View File

@@ -0,0 +1,20 @@
fileFormatVersion: 2
guid: c9a6b3aea7244ec4dbbdd59daa719466
timeCreated: 1520991429
licenseType: Store
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/CustomizableToolbarSettingsInspector.cs
uploadId: 814740

View File

@@ -0,0 +1,137 @@
using UnityEditor;
using UnityEngine;
using System;
using System.IO;
namespace GameKitController.Editor
{
public class EditorGUIHelper
{
public static void showAudioElementList (SerializedProperty list)
{
GUILayout.BeginVertical ();
EditorGUILayout.Space ();
var buttonStyle = new GUIStyle (GUI.skin.button);
buttonStyle.fontStyle = FontStyle.Bold;
buttonStyle.fontSize = 12;
if (GUILayout.Button ("Show/Hide " + list.displayName, buttonStyle)) {
list.isExpanded = !list.isExpanded;
}
EditorGUILayout.Space ();
if (list.isExpanded) {
EditorGUILayout.Space ();
GUILayout.Label ("Number of " + list.type + ": " + list.arraySize);
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("Add " + list.type)) {
list.arraySize++;
}
if (GUILayout.Button ("Clear")) {
list.arraySize = 0;
}
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("Expand All")) {
for (int i = 0; i < list.arraySize; i++) {
list.GetArrayElementAtIndex (i).isExpanded = true;
}
}
if (GUILayout.Button ("Collapse All")) {
for (int i = 0; i < list.arraySize; i++) {
list.GetArrayElementAtIndex (i).isExpanded = false;
}
}
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
for (int i = 0; i < list.arraySize; i++) {
bool expanded = false;
GUILayout.BeginHorizontal ();
GUILayout.BeginHorizontal ("box");
EditorGUILayout.Space ();
if (i < list.arraySize && i >= 0) {
EditorGUILayout.BeginVertical ();
EditorGUILayout.PropertyField (list.GetArrayElementAtIndex (i), false);
if (list.GetArrayElementAtIndex (i).isExpanded) {
if (list.type == typeof (audioSourceInfo).Name)
showAudioSourceInfoListElement (list.GetArrayElementAtIndex (i));
else
showAudioElementListElement (list.GetArrayElementAtIndex (i));
expanded = true;
}
EditorGUILayout.Space ();
GUILayout.EndVertical ();
}
GUILayout.EndHorizontal ();
if (expanded) {
GUILayout.BeginVertical ();
} else {
GUILayout.BeginHorizontal ();
}
if (GUILayout.Button ("x")) {
list.DeleteArrayElementAtIndex (i);
}
if (GUILayout.Button ("v")) {
if (i >= 0) {
list.MoveArrayElement (i, i + 1);
}
}
if (GUILayout.Button ("^")) {
if (i < list.arraySize) {
list.MoveArrayElement (i, i - 1);
}
}
if (expanded) {
GUILayout.EndVertical ();
} else {
GUILayout.EndHorizontal ();
}
GUILayout.EndHorizontal ();
}
}
EditorGUILayout.Space ();
GUILayout.EndVertical ();
}
private static void showAudioElementListElement (SerializedProperty list)
{
GUILayout.BeginVertical ("box");
EditorGUILayout.PropertyField (list.FindPropertyRelative ("audioPlayMethod"));
EditorGUILayout.PropertyField (list.FindPropertyRelative ("audioEventName"));
EditorGUILayout.PropertyField (list.FindPropertyRelative ("clip"));
EditorGUILayout.PropertyField (list.FindPropertyRelative ("audioSourceName"));
EditorGUILayout.PropertyField (list.FindPropertyRelative ("audioSource"));
GUILayout.EndVertical ();
}
private static void showAudioSourceInfoListElement (SerializedProperty list)
{
GUILayout.BeginVertical ("box");
EditorGUILayout.PropertyField (list.FindPropertyRelative ("audioSourceName"));
EditorGUILayout.PropertyField (list.FindPropertyRelative ("audioSource"));
GUILayout.EndVertical ();
}
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: ad2a26b79d5b4c62b435f8cd6935a169
timeCreated: 1667743708
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/EditorGUIHelper.cs
uploadId: 814740

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: fb3a63c7b10419948be9037606b04ad8
timeCreated: 1559153092
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/ExtendedMenuEditor.cs
uploadId: 814740

View File

@@ -0,0 +1,379 @@
using UnityEngine;
using System.Collections;
#if UNITY_EDITOR
using UnityEditor;
[CustomEditor (typeof(GKCUIManager))]
public class GKCUIManagerEditor : Editor
{
SerializedProperty managerEnabled;
SerializedProperty UIElementInfoList;
SerializedProperty objectSearcherName;
SerializedProperty objectSearchResultList;
SerializedProperty searchObjectsActive;
GKCUIManager manager;
SerializedProperty currentArrayElement;
bool expanded;
GUIStyle buttonStyle = new GUIStyle ();
void OnEnable ()
{
managerEnabled = serializedObject.FindProperty ("managerEnabled");
UIElementInfoList = serializedObject.FindProperty ("UIElementInfoList");
objectSearcherName = serializedObject.FindProperty ("objectSearcherName");
objectSearchResultList = serializedObject.FindProperty ("objectSearchResultList");
searchObjectsActive = serializedObject.FindProperty ("searchObjectsActive");
manager = (GKCUIManager)target;
}
public override void OnInspectorGUI ()
{
GUILayout.BeginVertical (GUILayout.Height (30));
buttonStyle = new GUIStyle (GUI.skin.button);
buttonStyle.fontStyle = FontStyle.Bold;
buttonStyle.fontSize = 12;
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Main Settings", "window");
EditorGUILayout.PropertyField (managerEnabled);
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("UI Info List", "window");
showUIElementInfoList (UIElementInfoList);
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("UI Object Searcher", "window");
EditorGUILayout.PropertyField (objectSearcherName, new GUIContent ("Name To Search"));
EditorGUILayout.Space ();
if (GUILayout.Button ("Search Objects By Name")) {
manager.showObjectsBySearchName ();
if (objectSearchResultList.arraySize > 0) {
objectSearchResultList.isExpanded = true;
}
}
if (searchObjectsActive.boolValue) {
if (GUILayout.Button ("Clear Results")) {
manager.clearObjectsSearcResultList ();
}
EditorGUILayout.Space ();
GUILayout.BeginVertical ("UI Object To Search Result List", "window");
showObjectSearchResultList (objectSearchResultList);
GUILayout.EndVertical ();
}
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.EndVertical ();
if (GUI.changed) {
serializedObject.ApplyModifiedProperties ();
}
}
void showUIElementInfoList (SerializedProperty list)
{
EditorGUILayout.Space ();
if (GUILayout.Button ("Show/Hide " + list.displayName, buttonStyle)) {
list.isExpanded = !list.isExpanded;
}
EditorGUILayout.Space ();
if (list.isExpanded) {
EditorGUILayout.Space ();
GUILayout.Label ("Number of Elements: " + list.arraySize);
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("Add Object")) {
list.arraySize++;
}
if (GUILayout.Button ("Clear")) {
list.arraySize = 0;
}
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("Expand All")) {
for (int i = 0; i < list.arraySize; i++) {
list.GetArrayElementAtIndex (i).isExpanded = true;
}
}
if (GUILayout.Button ("Collapse All")) {
for (int i = 0; i < list.arraySize; i++) {
list.GetArrayElementAtIndex (i).isExpanded = false;
}
}
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("Enable All")) {
manager.enableAllUIElement ();
}
if (GUILayout.Button ("Disable All")) {
manager.disableAllUIElement ();
}
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
for (int i = 0; i < list.arraySize; i++) {
expanded = false;
GUILayout.BeginHorizontal ();
GUILayout.BeginHorizontal ("box");
EditorGUILayout.Space ();
if (i < list.arraySize && i >= 0) {
EditorGUILayout.BeginVertical ();
currentArrayElement = list.GetArrayElementAtIndex (i);
string elementName = currentArrayElement.FindPropertyRelative ("Name").stringValue;
if (currentArrayElement.FindPropertyRelative ("elementActive").boolValue) {
elementName += " - Active";
} else {
elementName += " - Inactive";
}
EditorGUILayout.PropertyField (currentArrayElement, new GUIContent (elementName), false);
if (currentArrayElement.isExpanded) {
expanded = true;
showUIElementInfoListElement (currentArrayElement);
}
EditorGUILayout.Space ();
GUILayout.EndVertical ();
}
GUILayout.EndHorizontal ();
if (expanded) {
GUILayout.BeginVertical ();
} else {
GUILayout.BeginHorizontal ();
}
if (GUILayout.Button ("x")) {
list.DeleteArrayElementAtIndex (i);
}
if (GUILayout.Button ("v")) {
if (i >= 0) {
list.MoveArrayElement (i, i + 1);
}
}
if (GUILayout.Button ("^")) {
if (i < list.arraySize) {
list.MoveArrayElement (i, i - 1);
}
}
if (GUILayout.Button ("o", buttonStyle)) {
if (!Application.isPlaying) {
manager.selectObjectByIndex (i);
return;
}
}
if (GUILayout.Button ("+", buttonStyle)) {
if (!Application.isPlaying) {
manager.enableUIElement (list.GetArrayElementAtIndex (i).FindPropertyRelative ("Name").stringValue);
return;
}
}
if (GUILayout.Button ("-", buttonStyle)) {
if (!Application.isPlaying) {
manager.disableUIElement (list.GetArrayElementAtIndex (i).FindPropertyRelative ("Name").stringValue);
return;
}
}
if (expanded) {
GUILayout.EndVertical ();
} else {
GUILayout.EndHorizontal ();
}
GUILayout.EndHorizontal ();
}
}
}
void showUIElementInfoListElement (SerializedProperty list)
{
GUILayout.BeginVertical ("box");
GUILayout.BeginVertical ("Main Settings", "window");
EditorGUILayout.PropertyField (list.FindPropertyRelative ("Name"));
EditorGUILayout.Space ();
EditorGUILayout.PropertyField (list.FindPropertyRelative ("useMoreNameTagsToSearch"));
if (list.FindPropertyRelative ("useMoreNameTagsToSearch").boolValue) {
showSimpleList (list.FindPropertyRelative ("moreNameTagsToSearchList"));
}
EditorGUILayout.Space ();
EditorGUILayout.PropertyField (list.FindPropertyRelative ("UIGameObject"));
EditorGUILayout.Space ();
EditorGUILayout.PropertyField (list.FindPropertyRelative ("eventToEnableUIGameObject"));
EditorGUILayout.Space ();
EditorGUILayout.PropertyField (list.FindPropertyRelative ("envetToDisableUIGameObject"));
GUILayout.EndVertical ();
GUILayout.EndVertical ();
}
void showObjectSearchResultList (SerializedProperty list)
{
EditorGUILayout.Space ();
GUILayout.Label ("Number of Results: " + list.arraySize);
EditorGUILayout.Space ();
for (int i = 0; i < list.arraySize; i++) {
expanded = false;
GUILayout.BeginHorizontal ();
GUILayout.BeginHorizontal ("box");
EditorGUILayout.Space ();
if (i < list.arraySize && i >= 0) {
EditorGUILayout.BeginVertical ();
GUILayout.Label (list.GetArrayElementAtIndex (i).stringValue, EditorStyles.boldLabel, GUILayout.MaxWidth (200));
EditorGUILayout.Space ();
GUILayout.EndVertical ();
}
GUILayout.EndHorizontal ();
if (expanded) {
GUILayout.BeginVertical ();
} else {
GUILayout.BeginHorizontal ();
}
if (GUILayout.Button ("o", buttonStyle)) {
if (!Application.isPlaying) {
manager.selectObjectByName (list.GetArrayElementAtIndex (i).stringValue);
return;
}
}
if (GUILayout.Button ("+", buttonStyle)) {
if (!Application.isPlaying) {
manager.enableUIElement (list.GetArrayElementAtIndex (i).stringValue);
return;
}
}
if (GUILayout.Button ("-", buttonStyle)) {
if (!Application.isPlaying) {
manager.disableUIElement (list.GetArrayElementAtIndex (i).stringValue);
return;
}
}
if (expanded) {
GUILayout.EndVertical ();
} else {
GUILayout.EndHorizontal ();
}
GUILayout.EndHorizontal ();
}
}
void showSimpleList (SerializedProperty list)
{
EditorGUILayout.Space ();
if (GUILayout.Button ("Show/Hide " + list.displayName, buttonStyle)) {
list.isExpanded = !list.isExpanded;
}
EditorGUILayout.Space ();
if (list.isExpanded) {
EditorGUILayout.Space ();
GUILayout.Label ("Number Of Transforms: \t" + list.arraySize);
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("Add")) {
list.arraySize++;
}
if (GUILayout.Button ("Clear")) {
list.arraySize = 0;
}
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
for (int i = 0; i < list.arraySize; i++) {
GUILayout.BeginHorizontal ();
if (i < list.arraySize && i >= 0) {
EditorGUILayout.PropertyField (list.GetArrayElementAtIndex (i), new GUIContent ("", null, ""), false);
}
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("x")) {
list.DeleteArrayElementAtIndex (i);
return;
}
GUILayout.EndHorizontal ();
GUILayout.EndHorizontal ();
}
}
}
}
#endif

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 30ee4d81bb07f8a48831f4bc3d800d93
timeCreated: 1672478969
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/GKCUIManagerEditor.cs
uploadId: 814740

View File

@@ -0,0 +1,52 @@
using UnityEngine;
using System.Collections;
#if UNITY_EDITOR
using UnityEditor;
[CustomEditor (typeof(GKC_PoolingAIManager))]
public class GKC_PoolingAIManagerEditor : Editor
{
GKC_PoolingAIManager manager;
void OnEnable ()
{
manager = (GKC_PoolingAIManager)target;
}
public override void OnInspectorGUI ()
{
DrawDefaultInspector ();
EditorGUILayout.Space ();
GUILayout.Label ("EDITOR BUTTONS", EditorStyles.boldLabel);
EditorGUILayout.Space ();
if (GUILayout.Button ("Get All Pooling AI Elements On Level")) {
manager.getAllGKC_PoolingElementAIOnLevel ();
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Clear Pooling AI Elements On List")) {
manager.clearGKC_PoolingElementAIList();
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Enable All Pooling AI Elements On Level")) {
manager.enableAllGKC_PoolingElementAIOnLevel ();
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Disable All Pooling AI Elements On Level")) {
manager.disableAllGKC_PoolingElementAIOnLevel ();
}
EditorGUILayout.Space ();
}
}
#endif

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 9c9b748c6a4f1cf459451f08cb7e86ac
timeCreated: 1709264738
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/GKC_PoolingAIManagerEditor.cs
uploadId: 814740

View File

@@ -0,0 +1,40 @@
using UnityEngine;
using System.Collections;
#if UNITY_EDITOR
using UnityEditor;
[CustomEditor (typeof (GKC_PoolingElementAI))]
public class GKC_PoolingElementAIEditor : Editor
{
GKC_PoolingElementAI manager;
void OnEnable ()
{
manager = (GKC_PoolingElementAI)target;
}
public override void OnInspectorGUI ()
{
DrawDefaultInspector ();
EditorGUILayout.Space ();
GUILayout.Label ("EDITOR BUTTONS", EditorStyles.boldLabel);
EditorGUILayout.Space ();
if (GUILayout.Button ("Enable Pooling Elements On Object")) {
manager.checkEventsOnEnableOrDisablePoolingManagementOnObjectFromEditor (true);
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Disable Pooling Elements On Object")) {
manager.checkEventsOnEnableOrDisablePoolingManagementOnObjectFromEditor (false);
}
EditorGUILayout.Space ();
}
}
#endif

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 70c278d7a105882449ab09df65ff62f6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/GKC_PoolingElementAIEditor.cs
uploadId: 814740

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: b3456d3338fc72540accbf84366d8aba
timeCreated: 1475166539
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/IKDrivingSystemEditor.cs
uploadId: 814740

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 9d9c588e72fab5a41ac5ebea34d5490b
timeCreated: 1481023958
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/IKWeaponSystemEditor.cs
uploadId: 814740

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 5066e9b6e2e0c8149854baeca9b53dab
folderAsset: yes
timeCreated: 1503255544
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,81 @@
fileFormatVersion: 2
guid: 3cbf1c8392a878c419561acde81918c4
timeCreated: 1639679399
licenseType: Store
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/Resources/Delete Icon.png
uploadId: 814740

View File

@@ -0,0 +1,105 @@
fileFormatVersion: 2
guid: a1f26b2629b9be24084533e0346a3f69
timeCreated: 1557458208
licenseType: Store
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: Standalone
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: Android
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: WebGL
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/Resources/GKC_Logo.png
uploadId: 814740

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 424706783a53ba443a35010a7c6205bf
timeCreated: 1503255552
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/Resources/GUI.guiskin
uploadId: 814740

View File

@@ -0,0 +1,11 @@
"key","English","Spanish"
"Car","Car","Coche"
"Drive","Drive","Conducir"
"Motorbike","Motorbike","Motocicleta"
"This vehicle makes you cooler, am I right? And it has machine guns, so anyone will agree with you or they will regret it.","This vehicle makes you cooler, am I right? And it has machine guns, so anyone will agree with you or they will regret it.","Este vehiculo te hace mas guay, no crees? Y tiene ametralladoras, asi que todo el mundo creera lo mismo o se arrepentiran"
"This vehicle has a weapon turret attached. Use it with the mouse AND DESTROY ANYTHING YOU WANT.","This vehicle has a weapon turret attached. Use it with the mouse AND DESTROY ANYTHING YOU WANT.","Este coche tiene una torreta de armas. Apunta con la camara y DESTRUYE TODO LO QUE QUIERAS"
"Enemy","Enemy","Enemigo"
"Friend","Friend","Amigo"
"Broken hope","Broken hope","Esperanza Rota"
"Save","Save","Partida"
"Chapter","Chapter","Capitulo"
1 key English Spanish
2 Car Car Coche
3 Drive Drive Conducir
4 Motorbike Motorbike Motocicleta
5 This vehicle makes you cooler, am I right? And it has machine guns, so anyone will agree with you or they will regret it. This vehicle makes you cooler, am I right? And it has machine guns, so anyone will agree with you or they will regret it. Este vehiculo te hace mas guay, no crees? Y tiene ametralladoras, asi que todo el mundo creera lo mismo o se arrepentiran
6 This vehicle has a weapon turret attached. Use it with the mouse AND DESTROY ANYTHING YOU WANT. This vehicle has a weapon turret attached. Use it with the mouse AND DESTROY ANYTHING YOU WANT. Este coche tiene una torreta de armas. Apunta con la camara y DESTRUYE TODO LO QUE QUIERAS
7 Enemy Enemy Enemigo
8 Friend Friend Amigo
9 Broken hope Broken hope Esperanza Rota
10 Save Save Partida
11 Chapter Chapter Capitulo

View File

@@ -0,0 +1,16 @@
fileFormatVersion: 2
guid: 2593428310cfcce42ae06fbfcc9026f0
timeCreated: 1656444696
licenseType: Store
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/Resources/Interaction Objects
Localization.csv
uploadId: 814740

View File

@@ -0,0 +1,3 @@
"key","English","Spanish"
"Fuse","Fuse","Fusible"
"You can use it in a fuse box to close a circuit and give power to a device.","You can use it in a fuse box to close a circuit and give power to a device.","Puedes usar este fusible en una caja electrica para cerrar un circuito y activar la corriente en un dispositivo."
1 key English Spanish
2 Fuse Fuse Fusible
3 You can use it in a fuse box to close a circuit and give power to a device. You can use it in a fuse box to close a circuit and give power to a device. Puedes usar este fusible en una caja electrica para cerrar un circuito y activar la corriente en un dispositivo.

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 58851c14c21f7e6479fd7a6cc4527261
timeCreated: 1656444696
licenseType: Store
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/Resources/Inventory Info Localization.csv
uploadId: 814740

View File

@@ -0,0 +1,81 @@
fileFormatVersion: 2
guid: 43f0119a578f15e46869a43fea9c0767
timeCreated: 1639819466
licenseType: Store
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/Resources/Language Icon.png
uploadId: 814740

View File

@@ -0,0 +1,81 @@
fileFormatVersion: 2
guid: 5cf005842235b9a4685c685928d3aae3
timeCreated: 1628555906
licenseType: Store
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/Resources/Logo_reworked.png
uploadId: 814740

View File

@@ -0,0 +1,4 @@
"key","English","Spanish"
"Power off","Power off","Energia Cortada"
"Find the button to open the locked door.","Find the button to open the locked door.","Encuentra el boton para abrir la puerta bloqueada."
"The button to open the door has no power. There are 3 battery receivers on this room, find those 3 batteries and place them on the receivers to get the necessary power.","The button to open the door has no power. There are 3 battery receivers on this room, find those 3 batteries and place them on the receivers to get the necessary power.","El boton para abrir la puerta no tiene energia. Hay 3 adaptadores de bateria en esta sala, encuentra los 3 y activalos para conseguir la energia necesaria."
1 key English Spanish
2 Power off Power off Energia Cortada
3 Find the button to open the locked door. Find the button to open the locked door. Encuentra el boton para abrir la puerta bloqueada.
4 The button to open the door has no power. There are 3 battery receivers on this room, find those 3 batteries and place them on the receivers to get the necessary power. The button to open the door has no power. There are 3 battery receivers on this room, find those 3 batteries and place them on the receivers to get the necessary power. El boton para abrir la puerta no tiene energia. Hay 3 adaptadores de bateria en esta sala, encuentra los 3 y activalos para conseguir la energia necesaria.

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: cab9e6fc2a4495d4f8c1deb353767a24
timeCreated: 1656444696
licenseType: Store
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/Resources/Mission System Localization.csv
uploadId: 814740

View File

@@ -0,0 +1 @@
"key","English","Spanish"
1 key English Spanish

View File

@@ -0,0 +1,16 @@
fileFormatVersion: 2
guid: ad80f563985a6d944b7fd39a8511d2e2
timeCreated: 1658944148
licenseType: Store
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/Resources/Point And Click
System Localization.csv
uploadId: 814740

View File

@@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: 696b7f6d0ea641646b0273938ee1b098
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: -1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
applyGammaDecoding: 1
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/Resources/Reload Icon.png
uploadId: 814740

View File

@@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: 601fbd180bc20054693a36e01f3d8f3e
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: -1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
applyGammaDecoding: 1
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/Resources/Search Icon.png
uploadId: 814740

View File

@@ -0,0 +1,83 @@
"key","English","Spanish"
"Gravity Power","Gravity Power",""
"Grab Object","Grab Object",""
"Grab Objects","Grab Objects",""
"Carry Objects","Carry Objects",""
"Free Floating Mode","Free Floating Mode",""
"Zoom","Zoom",""
"Lock-on Target","Lock-on Target",""
"Double Jump","Double Jump",""
"Triple Jump","Triple Jump",""
"Air Dash","Air Dash",""
"Slow Down Fall","Slow Down Fall",""
"Climb Ledge","Climb Ledge",""
"Grab To Surface","Grab To Surface",""
"Wall Running","Wall Running",""
"Ground Dash","Ground Dash",""
"Crouch Sliding","Crouch Sliding",""
"Sprint","Sprint",""
"Roll","Roll",""
"Health","Health",""
"Shield","Shield",""
"Health Regeneration","Health Regeneration",""
"Stealth Mode","Stealth Mode",""
"Shield","Shield",""
"Teleport","Teleport",""
"Gravity Control","Gravity Control",""
"Magic Push Objects Around","Magic Push Objects Around",""
"Throw Fire","Throw Fire",""
"Throw Electricity","Throw Electricity",""
"Activate Heal Area","Activate Heal Area",""
"Throw Meteor","Throw Meteor",""
"Throw Stone","Throw Stone",""
"Throw Grenade","Throw Grenade",""
"Grappling Hook","Grappling Hook",""
"Activate Dissolve Area","Activate Dissolve Area",""
"Throw Poison","Throw Poison",""
"Sleep Spell Cast","Sleep Spell Cast",""
"Free Floating Mode","Free Floating Mode",""
"Drain Health","Drain Health",""
"Push Objects Forward","Push Objects Forward",""
"Throw Object","Throw Object",""
"Return Object","Return Object",""
"Cutting Mode","Cutting Mode",""
"Block","Block",""
"Stamina For Melee","Stamina For Melee",""
"Melee Without Stamina","Melee Without Stamina",""
"Combat Active On Throw Object","Combat Active On Throw Object",""
"Damage On Thorw-Return Weapon","Damage On Thorw-Return Weapon",""
"General Attack Damage","General Attack Damage",""
"This ability allows to change your gravity at any moment and walk on any surface. Activate it with R and disable it with F.","This ability allows to change your gravity at any moment and walk on any surface. Activate it with R and disable it with F.",""
"You can use this telekinesis ability to grab objects with your mind will. Aim in third person and press T.","You can use this telekinesis ability to grab objects with your mind will. Aim in third person and press T.",""
"You can use this telekinesis ability to grab multiple objects with your mind will. Press T at any moment in third person and in powers mode (change mode with H).","You can use this telekinesis ability to grab multiple objects with your mind will. Press T at any moment in third person and in powers mode (change mode with H).",""
"You can carry objects physically on your hands (you were weak previously for this).","You can carry objects physically on your hands (you were weak previously for this).",""
"This ability allows you to float in the air and move up and down freely.","This ability allows you to float in the air and move up and down freely.",""
"Press Tab to use a zoom at any moment.","Press Tab to use a zoom at any moment.",""
"Press L to follow a target with the camera. Press L again to stop the lock-on. Move the mouse to change between targets.","Press L to follow a target with the camera. Press L again to stop the lock-on. Move the mouse to change between targets.",""
"It allows to make a jump on the air, allowing to reach higher places.","It allows to make a jump on the air, allowing to reach higher places.",""
"It allows to make a second on the air.","It allows to make a second on the air.",""
"When you are in the air, press X to make an air dash. You can this dash multiple times.","When you are in the air, press X to make an air dash. You can this dash multiple times.",""
"Press and hold Jump on the air to slow down your fall speed.","Press and hold Jump on the air to slow down your fall speed.",""
"You can gran and climb any ledge. When you are grabbing a ledge, press Jump to jump from that ledge instead of climb it.","You can gran and climb any ledge. When you are grabbing a ledge, press Jump to jump from that ledge instead of climb it.",""
"When you are on the air, press Interaction (E) to grab to the closest surface (you need to be close to one at that moment).","When you are on the air, press Interaction (E) to grab to the closest surface (you need to be close to one at that moment).",""
"Move in forward direction toward a wall and jump. Keep the forward movement pressed to keep moving on that wall. Release that button or jump to stop the action (only on first person).","Move in forward direction toward a wall and jump. Keep the forward movement pressed to keep moving on that wall. Release that button or jump to stop the action (only on first person).",""
"Press two times any movement key to make a dash on the ground (only in first person).","Press two times any movement key to make a dash on the ground (only in first person).",""
"While you run, press Crouch (C) to slide on the ground. In slopes, you keep moving until you reach a flat surface (only in first person).","While you run, press Crouch (C) to slide on the ground. In slopes, you keep moving until you reach a flat surface (only in first person).",""
"Press Run (Left Shift) while you move to sprint while your stamina allows it or until you release Run.","Press Run (Left Shift) while you move to sprint while your stamina allows it or until you release Run.",""
"Press (X) to roll/slide forward. Press it while pressing the movement to roll/slide in that direction.","Press (X) to roll/slide forward. Press it while pressing the movement to roll/slide in that direction.",""
"Increases the total health amount.","Increases the total health amount.",""
"Activates a shield which protects you from damage and recharges after some time without receiving damage.","Activates a shield which protects you from damage and recharges after some time without receiving damage.",""
"Enables the regeneration of health over time.","Enables the regeneration of health over time.",""
"It turns the player invisible to enemies.","It turns the player invisible to enemies.",""
"A physical shield which can block any projectile that impacts with it.","A physical shield which can block any projectile that impacts with it.",""
"Allows to select any position in a range where to being displaced directly and very quickly. Press and hold Ability Key and look toward the position you want to teleport. Then, release the key.","Allows to select any position in a range where to being displaced directly and very quickly. Press and hold Ability Key and look toward the position you want to teleport. Then, release the key.",""
"Manipulate the gravity! Press and hold ability key to return to regular gravity.","Manipulate the gravity! Press and hold ability key to return to regular gravity.",""
"Allows to throw the melee weapon forward, causing damage where it impacts.","Allows to throw the melee weapon forward, causing damage where it impacts.",""
"It allows to return the thrown weapon to your hand directly, avoiding the need to pick the weapon from the place where it impacted.","It allows to return the thrown weapon to your hand directly, avoiding the need to pick the weapon from the place where it impacted.",""
"Allows to activate a focused mode where you can make cuts in any angle in a range of 360º, getting more accurate and precise damage.","Allows to activate a focused mode where you can make cuts in any angle in a range of 360º, getting more accurate and precise damage.",""
"Allows to block damage with a weapon. Maybe not all weapons have a block mode, and each one has a differnet range of protection.","Allows to block damage with a weapon. Maybe not all weapons have a block mode, and each one has a differnet range of protection.",""
"Decreases the total stamina used for attacks with a melee weapon a 10%.","Decreases the total stamina used for attacks with a melee weapon a 10%.",""
"The melee combat won't use any stamina, so you can attack indefinitely.","The melee combat won't use any stamina, so you can attack indefinitely.",""
"Allows to activate the close combat mode when the mele weapon is throw, so you can defend of use other combat style while you don't carry the weapon.","Allows to activate the close combat mode when the mele weapon is throw, so you can defend of use other combat style while you don't carry the weapon.",""
"Increases the damage applied to the detected object on throw with a 10%.","Increases the damage applied to the detected object on throw with a 10%.",""
"Increases the damage applied to the attacks of the melee weapon with a 10%.","Increases the damage applied to the attacks of the melee weapon with a 10%.",""
1 key English Spanish
2 Gravity Power Gravity Power
3 Grab Object Grab Object
4 Grab Objects Grab Objects
5 Carry Objects Carry Objects
6 Free Floating Mode Free Floating Mode
7 Zoom Zoom
8 Lock-on Target Lock-on Target
9 Double Jump Double Jump
10 Triple Jump Triple Jump
11 Air Dash Air Dash
12 Slow Down Fall Slow Down Fall
13 Climb Ledge Climb Ledge
14 Grab To Surface Grab To Surface
15 Wall Running Wall Running
16 Ground Dash Ground Dash
17 Crouch Sliding Crouch Sliding
18 Sprint Sprint
19 Roll Roll
20 Health Health
21 Shield Shield
22 Health Regeneration Health Regeneration
23 Stealth Mode Stealth Mode
24 Shield Shield
25 Teleport Teleport
26 Gravity Control Gravity Control
27 Magic Push Objects Around Magic Push Objects Around
28 Throw Fire Throw Fire
29 Throw Electricity Throw Electricity
30 Activate Heal Area Activate Heal Area
31 Throw Meteor Throw Meteor
32 Throw Stone Throw Stone
33 Throw Grenade Throw Grenade
34 Grappling Hook Grappling Hook
35 Activate Dissolve Area Activate Dissolve Area
36 Throw Poison Throw Poison
37 Sleep Spell Cast Sleep Spell Cast
38 Free Floating Mode Free Floating Mode
39 Drain Health Drain Health
40 Push Objects Forward Push Objects Forward
41 Throw Object Throw Object
42 Return Object Return Object
43 Cutting Mode Cutting Mode
44 Block Block
45 Stamina For Melee Stamina For Melee
46 Melee Without Stamina Melee Without Stamina
47 Combat Active On Throw Object Combat Active On Throw Object
48 Damage On Thorw-Return Weapon Damage On Thorw-Return Weapon
49 General Attack Damage General Attack Damage
50 This ability allows to change your gravity at any moment and walk on any surface. Activate it with R and disable it with F. This ability allows to change your gravity at any moment and walk on any surface. Activate it with R and disable it with F.
51 You can use this telekinesis ability to grab objects with your mind will. Aim in third person and press T. You can use this telekinesis ability to grab objects with your mind will. Aim in third person and press T.
52 You can use this telekinesis ability to grab multiple objects with your mind will. Press T at any moment in third person and in powers mode (change mode with H). You can use this telekinesis ability to grab multiple objects with your mind will. Press T at any moment in third person and in powers mode (change mode with H).
53 You can carry objects physically on your hands (you were weak previously for this). You can carry objects physically on your hands (you were weak previously for this).
54 This ability allows you to float in the air and move up and down freely. This ability allows you to float in the air and move up and down freely.
55 Press Tab to use a zoom at any moment. Press Tab to use a zoom at any moment.
56 Press L to follow a target with the camera. Press L again to stop the lock-on. Move the mouse to change between targets. Press L to follow a target with the camera. Press L again to stop the lock-on. Move the mouse to change between targets.
57 It allows to make a jump on the air, allowing to reach higher places. It allows to make a jump on the air, allowing to reach higher places.
58 It allows to make a second on the air. It allows to make a second on the air.
59 When you are in the air, press X to make an air dash. You can this dash multiple times. When you are in the air, press X to make an air dash. You can this dash multiple times.
60 Press and hold Jump on the air to slow down your fall speed. Press and hold Jump on the air to slow down your fall speed.
61 You can gran and climb any ledge. When you are grabbing a ledge, press Jump to jump from that ledge instead of climb it. You can gran and climb any ledge. When you are grabbing a ledge, press Jump to jump from that ledge instead of climb it.
62 When you are on the air, press Interaction (E) to grab to the closest surface (you need to be close to one at that moment). When you are on the air, press Interaction (E) to grab to the closest surface (you need to be close to one at that moment).
63 Move in forward direction toward a wall and jump. Keep the forward movement pressed to keep moving on that wall. Release that button or jump to stop the action (only on first person). Move in forward direction toward a wall and jump. Keep the forward movement pressed to keep moving on that wall. Release that button or jump to stop the action (only on first person).
64 Press two times any movement key to make a dash on the ground (only in first person). Press two times any movement key to make a dash on the ground (only in first person).
65 While you run, press Crouch (C) to slide on the ground. In slopes, you keep moving until you reach a flat surface (only in first person). While you run, press Crouch (C) to slide on the ground. In slopes, you keep moving until you reach a flat surface (only in first person).
66 Press Run (Left Shift) while you move to sprint while your stamina allows it or until you release Run. Press Run (Left Shift) while you move to sprint while your stamina allows it or until you release Run.
67 Press (X) to roll/slide forward. Press it while pressing the movement to roll/slide in that direction. Press (X) to roll/slide forward. Press it while pressing the movement to roll/slide in that direction.
68 Increases the total health amount. Increases the total health amount.
69 Activates a shield which protects you from damage and recharges after some time without receiving damage. Activates a shield which protects you from damage and recharges after some time without receiving damage.
70 Enables the regeneration of health over time. Enables the regeneration of health over time.
71 It turns the player invisible to enemies. It turns the player invisible to enemies.
72 A physical shield which can block any projectile that impacts with it. A physical shield which can block any projectile that impacts with it.
73 Allows to select any position in a range where to being displaced directly and very quickly. Press and hold Ability Key and look toward the position you want to teleport. Then, release the key. Allows to select any position in a range where to being displaced directly and very quickly. Press and hold Ability Key and look toward the position you want to teleport. Then, release the key.
74 Manipulate the gravity! Press and hold ability key to return to regular gravity. Manipulate the gravity! Press and hold ability key to return to regular gravity.
75 Allows to throw the melee weapon forward, causing damage where it impacts. Allows to throw the melee weapon forward, causing damage where it impacts.
76 It allows to return the thrown weapon to your hand directly, avoiding the need to pick the weapon from the place where it impacted. It allows to return the thrown weapon to your hand directly, avoiding the need to pick the weapon from the place where it impacted.
77 Allows to activate a focused mode where you can make cuts in any angle in a range of 360º, getting more accurate and precise damage. Allows to activate a focused mode where you can make cuts in any angle in a range of 360º, getting more accurate and precise damage.
78 Allows to block damage with a weapon. Maybe not all weapons have a block mode, and each one has a differnet range of protection. Allows to block damage with a weapon. Maybe not all weapons have a block mode, and each one has a differnet range of protection.
79 Decreases the total stamina used for attacks with a melee weapon a 10%. Decreases the total stamina used for attacks with a melee weapon a 10%.
80 The melee combat won't use any stamina, so you can attack indefinitely. The melee combat won't use any stamina, so you can attack indefinitely.
81 Allows to activate the close combat mode when the mele weapon is throw, so you can defend of use other combat style while you don't carry the weapon. Allows to activate the close combat mode when the mele weapon is throw, so you can defend of use other combat style while you don't carry the weapon.
82 Increases the damage applied to the detected object on throw with a 10%. Increases the damage applied to the detected object on throw with a 10%.
83 Increases the damage applied to the attacks of the melee weapon with a 10%. Increases the damage applied to the attacks of the melee weapon with a 10%.

View File

@@ -0,0 +1,84 @@
"key","English","Spanish"
"Gravity Power","Gravity Power",""
"Grab Object","Grab Object",""
"Grab Objects","Grab Objects",""
"Carry Objects","Carry Objects",""
"Free Floating Mode","Free Floating Mode",""
"Zoom","Zoom",""
"Lock-on Target","Lock-on Target",""
"Double Jump","Double Jump",""
"Triple Jump","",""
"Air Dash","",""
"Slow Down Fall","Slow Down Fall",""
"Climb Ledge","Climb Ledge",""
"Grab To Surface","Grab To Surface",""
"Wall Running","Wall Running",""
"Ground Dash","Ground Dash",""
"Crouch Sliding","Crouch Sliding",""
"Sprint","Sprint",""
"Roll","Roll",""
"Health","Health",""
"Shield","Shield",""
"Health Regeneration","Health Regeneration",""
"Stealth Mode","Stealth Mode",""
"Shield","Shield",""
"Teleport","Teleport",""
"Gravity Control","Gravity Control",""
"Magic Push Objects Around","Magic Push Objects Around",""
"Throw Fire","Throw Fire",""
"Throw Electricity","Throw Electricity",""
"Activate Heal Area","Activate Heal Area",""
"Throw Meteor","Throw Meteor",""
"Throw Stone","Throw Stone",""
"Throw Grenade","Throw Grenade",""
"Grappling Hook","Grappling Hook",""
"Activate Dissolve Area","Activate Dissolve Area",""
"Throw Poison","Throw Poison",""
"Sleep Spell Cast","Sleep Spell Cast",""
"Free Floating Mode","Free Floating Mode",""
"Drain Health","Drain Health",""
"Push Objects Forward","Push Objects Forward",""
"Throw Object","Throw Object",""
"Return Object","Return Object",""
"Cutting Mode","Cutting Mode",""
"Block","Block",""
"Stamina For Melee","Stamina For Melee",""
"Melee Without Stamina","Melee Without Stamina",""
"Combat Active On Throw Object","Combat Active On Throw Object",""
"Damage On Thorw-Return Weapon","Damage On Thorw-Return Weapon",""
"General Attack Damage","General Attack Damage",""
"This ability allows to change your gravity at any moment and walk on any surface. Activate it with R and disable it with F.","This ability allows to change your gravity at any moment and walk on any surface. Activate it with R and disable it with F.",""
"You can use this telekinesis ability to grab objects with your mind will. Aim in third person and press T.","You can use this telekinesis ability to grab objects with your mind will. Aim in third person and press T.",""
"You can use this telekinesis ability to grab multiple objects with your mind will. Press T at any moment in third person and in powers mode (change mode with H).","You can use this telekinesis ability to grab multiple objects with your mind will. Press T at any moment in third person and in powers mode (change mode with H).",""
"You can carry objects physically on your hands (you were weak previously for this).","You can carry objects physically on your hands (you were weak previously for this).",""
"This ability allows you to float in the air and move up and down freely.","This ability allows you to float in the air and move up and down freely.",""
"Press Tab to use a zoom at any moment.","Press Tab to use a zoom at any moment.",""
"Press L to follow a target with the camera. Press L again to stop the lock-on. Move the mouse to change between targets.","Press L to follow a target with the camera. Press L again to stop the lock-on. Move the mouse to change between targets.",""
"It allows to make a jump on the air, allowing to reach higher places.","It allows to make a jump on the air, allowing to reach higher places.",""
"It allows to make a second on the air.","It allows to make a second on the air.",""
"When you are in the air, press X to make an air dash. You can this dash multiple times.","When you are in the air, press X to make an air dash. You can this dash multiple times.",""
"Press and hold Jump on the air to slow down your fall speed.","Press and hold Jump on the air to slow down your fall speed.",""
"You can gran and climb any ledge. When you are grabbing a ledge, press Jump to jump from that ledge instead of climb it.","You can gran and climb any ledge. When you are grabbing a ledge, press Jump to jump from that ledge instead of climb it.",""
"When you are on the air, press Interaction (E) to grab to the closest surface (you need to be close to one at that moment).","When you are on the air, press Interaction (E) to grab to the closest surface (you need to be close to one at that moment).",""
"Move in forward direction toward a wall and jump. Keep the forward movement pressed to keep moving on that wall. Release that button or jump to stop the action (only on first person).","Move in forward direction toward a wall and jump. Keep the forward movement pressed to keep moving on that wall. Release that button or jump to stop the action (only on first person).",""
"Press two times any movement key to make a dash on the ground (only in first person).","Press two times any movement key to make a dash on the ground (only in first person).",""
"While you run, press Crouch (C) to slide on the ground. In slopes, you keep moving until you reach a flat surface (only in first person).","While you run, press Crouch (C) to slide on the ground. In slopes, you keep moving until you reach a flat surface (only in first person).",""
"Press Run (Left Shift) while you move to sprint while your stamina allows it or until you release Run.","Press Run (Left Shift) while you move to sprint while your stamina allows it or until you release Run.",""
"Press (X) to roll/slide forward. Press it while pressing the movement to roll/slide in that direction.","Press (X) to roll/slide forward. Press it while pressing the movement to roll/slide in that direction.",""
"Increases the total health amount.","Increases the total health amount.",""
"Activates a shield which protects you from damage and recharges after some time without receiving damage.","Activates a shield which protects you from damage and recharges after some time without receiving damage.",""
"Enables the regeneration of health over time.","Enables the regeneration of health over time.",""
"It turns the player invisible to enemies.","",""
"A physical shield which can block any projectile that impacts with it.","",""
"Allows to select any position in a range where to being displaced directly and very quickly. Press and hold Ability Key and look toward the position you want to teleport. Then, release the key.","",""
"Manipulate the gravity! Press and hold ability key to return to regular gravity.","",""
"Allows to throw the melee weapon forward, causing damage where it impacts.","",""
"It allows to return the thrown weapon to your hand directly, avoiding the need to pick the weapon from the place where it impacted.","",""
"Allows to activate a focused mode where you can make cuts in any angle in a range of 360º, getting more accurate and precise damage.","",""
"Allows to block damage with a weapon. Maybe not all weapons have a block mode, and each one has a differnet range of protection.","",""
"Decreases the total stamina used for attacks with a melee weapon a 10%.","",""
"The melee combat won't use any stamina, so you can attack indefinitely.","",""
"Allows to activate the close combat mode when the mele weapon is throw, so you can defend of use other combat style while you don't carry the weapon.","",""
"Increases the damage applied to the detected object on throw with a 10%.","",""
"Increases the damage applied to the attacks of the melee weapon with a 10%.","",""
"","",""

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: ed802d8b881f6d348840b71b10c915d2
timeCreated: 1658930151
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/Resources/Skills System Localization.csv.bak
uploadId: 814740

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 49572de2623d8fa4f8372f668e98ff65
timeCreated: 1658377630
licenseType: Store
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/Resources/Skills System Localization.csv
uploadId: 814740

View File

@@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: 886e7152e1e99fa48adcf47f0dd651c8
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: -1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
applyGammaDecoding: 1
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/Resources/Store Icon.png
uploadId: 814740

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 5c57516be5e4d614ebca8fe585fd742b
timeCreated: 1658930598
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/Resources/UI ELements Localization.csv.bak
uploadId: 814740

View File

@@ -0,0 +1,174 @@
"key","English","Spanish"
"PAUSE MENU","PAUSE MENU","MENU DE PAUSA"
"Resume","Resume","Resumir"
"Restart","Restart","Reiniciar"
"Switch Control Type (Touch/Keyboard)","Switch Control Type (Touch/Keyboard)","Cambiar Tipo de Control"
"Touch Options","Touch Options","Opciones Tactiles"
"Edit Input Controls","Edit Input Controls","Editar Controles"
"Exit To Home","Exit To Home","Salir Menu Principal"
"Exit To Desktop","Exit To Desktop","Salir Del Juego"
"Photo Mode","Photo Mode","Modo Foto"
"Toggle Console Debug (Off)","Toggle Console Debug (Off)","Cambiar Debug Consola (Off)"
"Toggle Console Debug (On)","Toggle Console Debug (On)","Cambiar Debug Consola (On)"
"Stop Game (Debug)","Stop Game (Debug)","Detener Juego (Debug)"
"Yes","Yes","Si"
"PLAYER OPTIONS MENU","PLAYER OPTIONS MENU","MENU DE OPCIONES"
"Movement Direction","Movement Direction","Direccion De Movimiento"
"Camera Direction","Camera Direction","Direccion De Camara"
"Reverse Vertical Movement","Reverse Vertical Movement","Movimiento Vertical Inverso"
"Reverse Horizontal Movement","Reverse Horizontal Movement","Movimiento Horizontal Inverso"
"Reverse Horizontal Camera","Reverse Horizontal Camera","Camara Horizontal Inversa"
"Reverse Vertical Camera","Reverse Vertical Camera","Camara Vertical Inversa"
"LEFT GAMEPAD JOYSTICK SENSITIVITY","LEFT GAMEPAD JOYSTICK SENSITIVITY","SENSIBILIDAD JOYSTICK IZQUIERDO"
"RIGHT GAMEPAD JOYSTICK SENSITIVITY","RIGHT GAMEPAD JOYSTICK SENSITIVITY","SENSIBILIDAD JOYSTICK DERECHO"
"Set Default","Set Default","Por Defecto"
"Back","Back","Volver"
"MOUSE SENSITIVITY","MOUSE SENSITIVITY","SENSIBILIDAD RATON"
"GAME VOLUME","GAME VOLUME","VOLUMEN DEL JUEGO"
"LANGUAGE","LANGUAGE","IDIOMA"
"Show Ingame Controls","Show Ingame Controls","Mostrar Controles Juego"
"Next","Next","Siguiente"
"Close","Close","Cerrar"
"Return","Return","Volver"
"Cancel Objective","Cancel Objective","Cancelar Mision"
"Active Objective","Active Objective","Activar Mision"
"OBJECTIVE LOG","OBJECTIVE LOG","DIARIO"
"Settings","Settings","Configuracion"
"New Game","New Game","Nuevo Juego"
"Load","Load","Cargar"
"Exit","Exit","Salir"
"Single Player Demos","Single Player Demos","Demos Modo Campaña"
"Scene Manager Demos","Scene Manager Demos","Demos Manager Escenas"
"Local Multiplayer Demos","Local Multiplayer Demos","Demos Modo Multijugador Local"
"Customize Character","Customize Character","Personalizar Jugador"
"Character Customization","Character Customization","Personalizacion Jugador"
"Class","Class","Clase"
"Face","Face","Cara"
"Face Features","Face Features","Rasgos Faciales"
"Save","Save","Guardar"
"Basic","Basic","Basico"
"TOUCH OPTIONS MENU","TOUCH OPTIONS MENU","CONTROLES TACTILES"
"Set Default Buttons Positions","Set Default Buttons Positions","Posicion Botones Por Defecto"
"Edit Buttons Position","Edit Buttons Position","Editar Posicion Botones"
"Use Accelerometer","Use Accelerometer","Usar Acelerometro"
"Show Touch Scheme","Show Touch Scheme","Mostrar Controles"
"Joysticks Sensitivity","Joysticks Sensitivity","Sensibilidad Joysticks"
"Left","Left","Izquierda"
"Right","Right","Derecha"
"Joysticks Settings","Joysticks Settings","Ajustes De Joysticks"
"Snap To Finger","Snap To Finger","Ajustar A Pulsacion"
"Hide On Release","Hide On Release","Ocultar Al Soltar"
"Touchpad","Touchpad","Pad Tactil"
"Show Joystick","Show Joystick","Mostrar Joystick"
"Toggle Touch Buttons Visible","Toggle Touch Buttons Visible","Cambiar Visibilidade Controles Tactiles"
"EDIT INPUT CONTROLS","EDIT INPUT CONTROLS","EDITAR CONTROLES TACTILES"
"LOAD/SAVE GAME","LOAD/SAVE GAME","CARGAR/GUARDAR JUEGO"
"Cancel","Cancel","Cancelar"
"Delete","Delete","Borrar"
"GALLERY","GALLERY","GALERIA"
"Expand","Expand","Expandir"
"TUTORIALS MENU","TUTORIALS MENU","MENU TUTORIALES"
"Tutorials ingame enabled","Tutorials ingame enabled","Mostrar Tutoriales Activo"
"GRAPHICS QUALITY","GRAPHICS QUALITY","CALIDAD GRAFICA"
"RESOLUTION","RESOLUTION","RESOLUCION"
"Windowed","Windowed","Ventana"
"EXIT TO MAIN MENU?","EXIT TO MAIN MENU?","¿VOLVER AL MENU PRINCIPAL?"
"EXIT TO DESKTOP?","EXIT TO DESKTOP?","¿SALIR AL ESCRITORIO?"
"YOU ARE DEAD","YOU ARE DEAD","ESTAS MUERTO"
"WHAT DO YOU WANT TO DO?","WHAT DO YOU WANT TO DO?","¿QUE QUIERES HACER?"
"Load Game","Load Game","Cargar Juego"
"Exit To Home","Exit To Home","Salir Al Menu"
"Get Up","Get Up","Levantarse"
"Exit Desktop","Exit Desktop","Salir Del Juego"
"EXIT TO MAIN MENU?","EXIT TO MAIN MENU?","¿SALIR AL MENU?"
"EXIT TO DESKTOP?","EXIT TO DESKTOP?","¿SALIR DEL JUEGO?"
"Weapons","Weapons","Armas"
"Melee","Melee","Espadas"
"Combat","Combat","Combate"
"Powers","Powers","Poderes"
"Magic","Magic","Magia"
"Simple Mode","Simple Mode","Mode Simple"
"MAP","MAP","MAPA"
"MAP INFO","MAP INFO","INFORMACION"
"Show Index","Show Index","Indice"
"Recenter","Recenter","Centrar"
"Place Mark","Place Mark","Colocar Icono"
"Quick Travel","Quick Travel","Viaje Rapido"
"MODE","MODE","MODO"
"Attack","Attack","Atacar"
"Follow","Follow","Seguir"
"Wait","Wait","Esperar"
"Hide","Hide","Ocultar"
"Switch","Switch","Cambiar"
"ORDERS","ORDERS","ORDENES"
"FRIENDS LIST MANAGER","FRIEND LIST MANAGER","LISTA DE AMIGOS"
"State","State","Estado"
"PLAYER CONTROL MODE","PLAYER CONTROL MODE","MODO DE CONTROL"
"Free Floating","Free Floating","Flotar"
"Fly","Fly","Volar"
"Regular","Regular","Normal"
"Sphere","Sphere","Esfera"
"TRAVEL STATION","TRAVEL STATION","VIAJE RAPIDO"
"Travel To Station","Travel To Station","Confirmar Viaje"
"OBJECTIVE LOG","OBJECTIVE LOG","MISIONES"
"Cancel Objective","Cancel Objective","Cancelar Mision"
"Active Objective","Active Objective","Activar Mision"
"EXPERIENCE","EXPERIENCE","EXPERIENCIA"
"STATS","STATS","ESTADISTICAS"
"Main Stats","Main Stats","Principales"
"Weapons Stats","Weapon Stats","Armas"
"Other Stats","Other Stats","Otros"
"CREDITS","CREDITS","CREDITOS"
"UPGRADES SLOTS","UPGRADES SLOTS","PUNTOS HABILIDAD"
"NEXT LEVEL","NEXT LEVEL","PROX NIVEL"
"TOTAL XP","TOTAL XP","PTOS XP"
"ABILITIES EDITOR","ABILITIES EDITOR","EDITOR HABILIDADES"
"SKILLS","SKILLS","HABILIDADES"
"SKILL POINTS REQUIRED","SKILL POINTS REQUIRED","PUNTOS REQUERIDOS"
"Abilities","Abilities","Habilidades"
"Movements","Movements","Movimientos"
"Others","Others","Otros"
"TAKE","TAKE","COGER"
"Saving....","Saving....","Guardando..."
"SHOP","SHOP","TIENDA"
"TYPES","TYPES","TIPOS"
"BUY","BUY","COMPRAR"
"SELL","SELL","VENDER"
"Object Information","Object Information","Informacion Objeto"
"TOTAL AMOUNT","TOTAL AMOUNT","COSTE TOTAL"
"OBJECTS TYPE","OBJECTS TYPE","OBJETOS"
"CREDITS:","CREDITS:","CREDITOS:"
"WARNING:\nTHIS OBJECT IS OUT OF STOCK!","WARNING:\nTHIS OBJECT IS OUT OF STOCK!","ADVERTENCIA:\nESTE OBJETO ESTA FUERA DE STOCK"
"WARNING:\nYOU HAVEN'T ENOUGH MONEY TO BUY THIS OBJECT!","WARNING:\nYOU HAVEN'T ENOUGH MONEY TO BUY THIS OBJECT!","ADVERTENCIA:\nNO TIENES SUFICIENTE DINERO"
"WARNING:\nYOU HAVEN'T ENOUGH LEVEL TO BUY THIS OBJECT!","WARNING:\nYOU HAVEN'T ENOUGH LEVEL TO BUY THIS OBJECT!","ADVERTENCIA:\nNO TIENES SUFICIENTE NIVEL"
"INVENTORY","INVENTORY","INVENTARIO"
"USE","USE","USAR"
"EQUIP","EQUIP","EQUIPAR"
"UNEQUIP","UNEQUIP","QUITAR"
"DROP","DROP","TIRAR"
"COMBINE","COMBINE","UNIR"
"EXAMINE","EXAMINE","MIRAR"
"DISCARD","DISCARD","DESCARTAR"
"DROP ALL","DROP ALL","TIRAR TODO"
"MOVE ALL","MOVE ALL","MOVER TODO"
"INVENTORY BANK","INVENTORY BANK","CAJA FUERTE"
"Level Selection Menu","Level Selection Menu","Menu Seleccion Nivel"
"Continue","Continue","Continuar"
"CONTINUE","CONTINUE","CONTINUAR"
"Device text example 1","Bla bla bla bla","Dispositivo de texto 1"
"Loading... ","Loading... ","Cargando... "
"Click anywhere to start.","Click anywhere to start.","Pulsa para continuar."
"The game is loading the scene to play, please wait.","The game is loading the scene to play, please wait.","El juego esta cargando, espera por favor."
"You can rebind the input on the escape menu, along many other useful ingame options.","You can rebind the input on the escape menu, along many other useful ingame options.","Puedes editar el input en el menu de pausa, incluyendo otras opciones utiles."
"You can use B to open the abilities wheel and move the mouse around to select an ability. Then, you can press B to use the current ability.","You can use B to open the abilities wheel and move the mouse around to select an ability. Then, you can press B to use the current ability.","Puedes usar B para abrir la rueda de habilidades y mover el raton para seleccionar la que desees. Despues, pulsa B para usar la habilidad seleccionada."
"If the keyboard is not working, make sure a gamepad is not connected or use the gamepad, as the keyboard is ignored by default if a gamepad is detected.","If the keyboard is not working, make sure a gamepad is not connected or use the gamepad, as the keyboard is ignored by default if a gamepad is detected.","Si el teclado o responder, comprueba si hay un gamepad conectado para usarlo o desconectarlo, ya que en en ese caso, el teclado es ignorado."
"Spanish","Spanish","Español"
"English","English","Ingles"
"French","French","Frances"
"Very Low","Very Low","Muy Bajo"
"Low","Low","Bajo"
"Medium","Medium","Medio"
"Good","Good","Bueno"
"Very Good","Very Good","Muy Bueno"
"Ultra","Ultra","Ultra"
"BASIC CONTROLS","BASIC CONTROLS","CONTROLES BASICOS"
1 key English Spanish
2 PAUSE MENU PAUSE MENU MENU DE PAUSA
3 Resume Resume Resumir
4 Restart Restart Reiniciar
5 Switch Control Type (Touch/Keyboard) Switch Control Type (Touch/Keyboard) Cambiar Tipo de Control
6 Touch Options Touch Options Opciones Tactiles
7 Edit Input Controls Edit Input Controls Editar Controles
8 Exit To Home Exit To Home Salir Menu Principal
9 Exit To Desktop Exit To Desktop Salir Del Juego
10 Photo Mode Photo Mode Modo Foto
11 Toggle Console Debug (Off) Toggle Console Debug (Off) Cambiar Debug Consola (Off)
12 Toggle Console Debug (On) Toggle Console Debug (On) Cambiar Debug Consola (On)
13 Stop Game (Debug) Stop Game (Debug) Detener Juego (Debug)
14 Yes Yes Si
15 PLAYER OPTIONS MENU PLAYER OPTIONS MENU MENU DE OPCIONES
16 Movement Direction Movement Direction Direccion De Movimiento
17 Camera Direction Camera Direction Direccion De Camara
18 Reverse Vertical Movement Reverse Vertical Movement Movimiento Vertical Inverso
19 Reverse Horizontal Movement Reverse Horizontal Movement Movimiento Horizontal Inverso
20 Reverse Horizontal Camera Reverse Horizontal Camera Camara Horizontal Inversa
21 Reverse Vertical Camera Reverse Vertical Camera Camara Vertical Inversa
22 LEFT GAMEPAD JOYSTICK SENSITIVITY LEFT GAMEPAD JOYSTICK SENSITIVITY SENSIBILIDAD JOYSTICK IZQUIERDO
23 RIGHT GAMEPAD JOYSTICK SENSITIVITY RIGHT GAMEPAD JOYSTICK SENSITIVITY SENSIBILIDAD JOYSTICK DERECHO
24 Set Default Set Default Por Defecto
25 Back Back Volver
26 MOUSE SENSITIVITY MOUSE SENSITIVITY SENSIBILIDAD RATON
27 GAME VOLUME GAME VOLUME VOLUMEN DEL JUEGO
28 LANGUAGE LANGUAGE IDIOMA
29 Show Ingame Controls Show Ingame Controls Mostrar Controles Juego
30 Next Next Siguiente
31 Close Close Cerrar
32 Return Return Volver
33 Cancel Objective Cancel Objective Cancelar Mision
34 Active Objective Active Objective Activar Mision
35 OBJECTIVE LOG OBJECTIVE LOG DIARIO
36 Settings Settings Configuracion
37 New Game New Game Nuevo Juego
38 Load Load Cargar
39 Exit Exit Salir
40 Single Player Demos Single Player Demos Demos Modo Campaña
41 Scene Manager Demos Scene Manager Demos Demos Manager Escenas
42 Local Multiplayer Demos Local Multiplayer Demos Demos Modo Multijugador Local
43 Customize Character Customize Character Personalizar Jugador
44 Character Customization Character Customization Personalizacion Jugador
45 Class Class Clase
46 Face Face Cara
47 Face Features Face Features Rasgos Faciales
48 Save Save Guardar
49 Basic Basic Basico
50 TOUCH OPTIONS MENU TOUCH OPTIONS MENU CONTROLES TACTILES
51 Set Default Buttons Positions Set Default Buttons Positions Posicion Botones Por Defecto
52 Edit Buttons Position Edit Buttons Position Editar Posicion Botones
53 Use Accelerometer Use Accelerometer Usar Acelerometro
54 Show Touch Scheme Show Touch Scheme Mostrar Controles
55 Joysticks Sensitivity Joysticks Sensitivity Sensibilidad Joysticks
56 Left Left Izquierda
57 Right Right Derecha
58 Joysticks Settings Joysticks Settings Ajustes De Joysticks
59 Snap To Finger Snap To Finger Ajustar A Pulsacion
60 Hide On Release Hide On Release Ocultar Al Soltar
61 Touchpad Touchpad Pad Tactil
62 Show Joystick Show Joystick Mostrar Joystick
63 Toggle Touch Buttons Visible Toggle Touch Buttons Visible Cambiar Visibilidade Controles Tactiles
64 EDIT INPUT CONTROLS EDIT INPUT CONTROLS EDITAR CONTROLES TACTILES
65 LOAD/SAVE GAME LOAD/SAVE GAME CARGAR/GUARDAR JUEGO
66 Cancel Cancel Cancelar
67 Delete Delete Borrar
68 GALLERY GALLERY GALERIA
69 Expand Expand Expandir
70 TUTORIALS MENU TUTORIALS MENU MENU TUTORIALES
71 Tutorials ingame enabled Tutorials ingame enabled Mostrar Tutoriales Activo
72 GRAPHICS QUALITY GRAPHICS QUALITY CALIDAD GRAFICA
73 RESOLUTION RESOLUTION RESOLUCION
74 Windowed Windowed Ventana
75 EXIT TO MAIN MENU? EXIT TO MAIN MENU? ¿VOLVER AL MENU PRINCIPAL?
76 EXIT TO DESKTOP? EXIT TO DESKTOP? ¿SALIR AL ESCRITORIO?
77 YOU ARE DEAD YOU ARE DEAD ESTAS MUERTO
78 WHAT DO YOU WANT TO DO? WHAT DO YOU WANT TO DO? ¿QUE QUIERES HACER?
79 Load Game Load Game Cargar Juego
80 Exit To Home Exit To Home Salir Al Menu
81 Get Up Get Up Levantarse
82 Exit Desktop Exit Desktop Salir Del Juego
83 EXIT TO MAIN MENU? EXIT TO MAIN MENU? ¿SALIR AL MENU?
84 EXIT TO DESKTOP? EXIT TO DESKTOP? ¿SALIR DEL JUEGO?
85 Weapons Weapons Armas
86 Melee Melee Espadas
87 Combat Combat Combate
88 Powers Powers Poderes
89 Magic Magic Magia
90 Simple Mode Simple Mode Mode Simple
91 MAP MAP MAPA
92 MAP INFO MAP INFO INFORMACION
93 Show Index Show Index Indice
94 Recenter Recenter Centrar
95 Place Mark Place Mark Colocar Icono
96 Quick Travel Quick Travel Viaje Rapido
97 MODE MODE MODO
98 Attack Attack Atacar
99 Follow Follow Seguir
100 Wait Wait Esperar
101 Hide Hide Ocultar
102 Switch Switch Cambiar
103 ORDERS ORDERS ORDENES
104 FRIENDS LIST MANAGER FRIEND LIST MANAGER LISTA DE AMIGOS
105 State State Estado
106 PLAYER CONTROL MODE PLAYER CONTROL MODE MODO DE CONTROL
107 Free Floating Free Floating Flotar
108 Fly Fly Volar
109 Regular Regular Normal
110 Sphere Sphere Esfera
111 TRAVEL STATION TRAVEL STATION VIAJE RAPIDO
112 Travel To Station Travel To Station Confirmar Viaje
113 OBJECTIVE LOG OBJECTIVE LOG MISIONES
114 Cancel Objective Cancel Objective Cancelar Mision
115 Active Objective Active Objective Activar Mision
116 EXPERIENCE EXPERIENCE EXPERIENCIA
117 STATS STATS ESTADISTICAS
118 Main Stats Main Stats Principales
119 Weapons Stats Weapon Stats Armas
120 Other Stats Other Stats Otros
121 CREDITS CREDITS CREDITOS
122 UPGRADES SLOTS UPGRADES SLOTS PUNTOS HABILIDAD
123 NEXT LEVEL NEXT LEVEL PROX NIVEL
124 TOTAL XP TOTAL XP PTOS XP
125 ABILITIES EDITOR ABILITIES EDITOR EDITOR HABILIDADES
126 SKILLS SKILLS HABILIDADES
127 SKILL POINTS REQUIRED SKILL POINTS REQUIRED PUNTOS REQUERIDOS
128 Abilities Abilities Habilidades
129 Movements Movements Movimientos
130 Others Others Otros
131 TAKE TAKE COGER
132 Saving.... Saving.... Guardando...
133 SHOP SHOP TIENDA
134 TYPES TYPES TIPOS
135 BUY BUY COMPRAR
136 SELL SELL VENDER
137 Object Information Object Information Informacion Objeto
138 TOTAL AMOUNT TOTAL AMOUNT COSTE TOTAL
139 OBJECTS TYPE OBJECTS TYPE OBJETOS
140 CREDITS: CREDITS: CREDITOS:
141 WARNING:\nTHIS OBJECT IS OUT OF STOCK! WARNING:\nTHIS OBJECT IS OUT OF STOCK! ADVERTENCIA:\nESTE OBJETO ESTA FUERA DE STOCK
142 WARNING:\nYOU HAVEN'T ENOUGH MONEY TO BUY THIS OBJECT! WARNING:\nYOU HAVEN'T ENOUGH MONEY TO BUY THIS OBJECT! ADVERTENCIA:\nNO TIENES SUFICIENTE DINERO
143 WARNING:\nYOU HAVEN'T ENOUGH LEVEL TO BUY THIS OBJECT! WARNING:\nYOU HAVEN'T ENOUGH LEVEL TO BUY THIS OBJECT! ADVERTENCIA:\nNO TIENES SUFICIENTE NIVEL
144 INVENTORY INVENTORY INVENTARIO
145 USE USE USAR
146 EQUIP EQUIP EQUIPAR
147 UNEQUIP UNEQUIP QUITAR
148 DROP DROP TIRAR
149 COMBINE COMBINE UNIR
150 EXAMINE EXAMINE MIRAR
151 DISCARD DISCARD DESCARTAR
152 DROP ALL DROP ALL TIRAR TODO
153 MOVE ALL MOVE ALL MOVER TODO
154 INVENTORY BANK INVENTORY BANK CAJA FUERTE
155 Level Selection Menu Level Selection Menu Menu Seleccion Nivel
156 Continue Continue Continuar
157 CONTINUE CONTINUE CONTINUAR
158 Device text example 1 Bla bla bla bla Dispositivo de texto 1
159 Loading... Loading... Cargando...
160 Click anywhere to start. Click anywhere to start. Pulsa para continuar.
161 The game is loading the scene to play, please wait. The game is loading the scene to play, please wait. El juego esta cargando, espera por favor.
162 You can rebind the input on the escape menu, along many other useful ingame options. You can rebind the input on the escape menu, along many other useful ingame options. Puedes editar el input en el menu de pausa, incluyendo otras opciones utiles.
163 You can use B to open the abilities wheel and move the mouse around to select an ability. Then, you can press B to use the current ability. You can use B to open the abilities wheel and move the mouse around to select an ability. Then, you can press B to use the current ability. Puedes usar B para abrir la rueda de habilidades y mover el raton para seleccionar la que desees. Despues, pulsa B para usar la habilidad seleccionada.
164 If the keyboard is not working, make sure a gamepad is not connected or use the gamepad, as the keyboard is ignored by default if a gamepad is detected. If the keyboard is not working, make sure a gamepad is not connected or use the gamepad, as the keyboard is ignored by default if a gamepad is detected. Si el teclado o responder, comprueba si hay un gamepad conectado para usarlo o desconectarlo, ya que en en ese caso, el teclado es ignorado.
165 Spanish Spanish Español
166 English English Ingles
167 French French Frances
168 Very Low Very Low Muy Bajo
169 Low Low Bajo
170 Medium Medium Medio
171 Good Good Bueno
172 Very Good Very Good Muy Bueno
173 Ultra Ultra Ultra
174 BASIC CONTROLS BASIC CONTROLS CONTROLES BASICOS

View File

@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 58c82f23dd0f50c4badaa986f9eca686
timeCreated: 1660132638
licenseType: Store
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/Resources/UI Elements Localization.csv
uploadId: 814740

Binary file not shown.

View File

@@ -0,0 +1,17 @@
fileFormatVersion: 2
guid: adff2adbbe11da14b9f743053737eb59
timeCreated: 1520991379
licenseType: Store
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/Settings.asset
uploadId: 814740

View File

@@ -0,0 +1,217 @@
using UnityEngine;
using System.Collections;
#if UNITY_EDITOR
using UnityEditor;
[CanEditMultipleObjects]
[CustomEditor (typeof(WaypointCircuit))]
public class WaypointCircuitEditor : Editor
{
SerializedProperty smoothRoute;
SerializedProperty editorVisualisationSubsteps;
SerializedProperty showGizmo;
SerializedProperty gizmoLabelColor;
SerializedProperty gizmoRadius;
SerializedProperty useHandleForVertex;
SerializedProperty showVertexHandles;
SerializedProperty handleRadius;
SerializedProperty handleGizmoColor;
SerializedProperty waypointList;
WaypointCircuit manager;
GUIStyle style = new GUIStyle ();
GUIStyle buttonStyle = new GUIStyle ();
Transform currentWaypoint;
Quaternion currentWaypointRotation;
Vector3 oldPoint;
Vector3 newPoint;
void OnEnable ()
{
smoothRoute = serializedObject.FindProperty ("smoothRoute");
editorVisualisationSubsteps = serializedObject.FindProperty ("editorVisualisationSubsteps");
showGizmo = serializedObject.FindProperty ("showGizmo");
gizmoLabelColor = serializedObject.FindProperty ("gizmoLabelColor");
gizmoRadius = serializedObject.FindProperty ("gizmoRadius");
useHandleForVertex = serializedObject.FindProperty ("useHandleForVertex");
handleRadius = serializedObject.FindProperty ("handleRadius");
handleGizmoColor = serializedObject.FindProperty ("handleGizmoColor");
waypointList = serializedObject.FindProperty ("waypointList");
showVertexHandles = serializedObject.FindProperty ("showVertexHandles");
manager = (WaypointCircuit)target;
}
void OnSceneGUI ()
{
if (manager.showGizmo) {
style.normal.textColor = manager.gizmoLabelColor;
style.alignment = TextAnchor.MiddleCenter;
for (int i = 0; i < manager.waypointList.Count; i++) {
if (manager.waypointList [i] != null) {
currentWaypoint = manager.waypointList [i];
Handles.Label (currentWaypoint.position, currentWaypoint.name, style);
if (manager.useHandleForVertex) {
Handles.color = manager.handleGizmoColor;
EditorGUI.BeginChangeCheck ();
oldPoint = currentWaypoint.position;
var fmh_69_52_638979118401547809 = Quaternion.identity; newPoint = Handles.FreeMoveHandle (oldPoint, manager.handleRadius, new Vector3 (.25f, .25f, .25f), Handles.CircleHandleCap);
if (EditorGUI.EndChangeCheck ()) {
Undo.RecordObject (currentWaypoint, "move waypoint circuit Handle");
currentWaypoint.position = newPoint;
}
}
if (manager.showVertexHandles) {
currentWaypointRotation = Tools.pivotRotation == PivotRotation.Local ? currentWaypoint.rotation : Quaternion.identity;
EditorGUI.BeginChangeCheck ();
oldPoint = currentWaypoint.position;
oldPoint = Handles.DoPositionHandle (oldPoint, currentWaypointRotation);
if (EditorGUI.EndChangeCheck ()) {
Undo.RecordObject (currentWaypoint, "move waypoint circuit" + i);
currentWaypoint.position = oldPoint;
}
}
}
}
}
}
public override void OnInspectorGUI ()
{
GUILayout.BeginVertical (GUILayout.Height (30));
EditorGUILayout.Space ();
buttonStyle = new GUIStyle (GUI.skin.button);
buttonStyle.fontStyle = FontStyle.Bold;
buttonStyle.fontSize = 12;
GUILayout.BeginVertical ("Main Settings", "window", GUILayout.Height (30));
EditorGUILayout.PropertyField (smoothRoute);
EditorGUILayout.PropertyField (editorVisualisationSubsteps);
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Gizmo Options", "window", GUILayout.Height (30));
EditorGUILayout.PropertyField (showGizmo);
if (showGizmo.boolValue) {
EditorGUILayout.PropertyField (gizmoLabelColor);
EditorGUILayout.PropertyField (gizmoRadius);
EditorGUILayout.PropertyField (useHandleForVertex);
if (useHandleForVertex.boolValue) {
EditorGUILayout.PropertyField (handleRadius);
EditorGUILayout.PropertyField (handleGizmoColor);
} else {
EditorGUILayout.PropertyField (showVertexHandles);
}
}
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Waypoints List", "window", GUILayout.Height (30));
showUpperList (waypointList);
GUILayout.EndVertical ();
if (GUI.changed) {
serializedObject.ApplyModifiedProperties ();
}
EditorGUILayout.Space ();
}
void showUpperList (SerializedProperty list)
{
EditorGUILayout.Space ();
if (GUILayout.Button ("Show/Hide Multi Axes List", buttonStyle)) {
list.isExpanded = !list.isExpanded;
}
EditorGUILayout.Space ();
if (list.isExpanded) {
EditorGUILayout.Space ();
GUILayout.Label ("Number Of Waypoints: \t" + list.arraySize);
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("Add Point")) {
manager.addNewWayPoint ();
}
if (GUILayout.Button ("Clear")) {
list.arraySize = 0;
}
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
for (int i = 0; i < list.arraySize; i++) {
GUILayout.BeginHorizontal ();
if (i < list.arraySize && i >= 0) {
EditorGUILayout.PropertyField (list.GetArrayElementAtIndex (i), new GUIContent ("", null, ""), false);
}
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("x")) {
if (list.GetArrayElementAtIndex (i).objectReferenceValue) {
Transform point = list.GetArrayElementAtIndex (i).objectReferenceValue as Transform;
DestroyImmediate (point.gameObject);
}
list.DeleteArrayElementAtIndex (i);
list.DeleteArrayElementAtIndex (i);
}
if (GUILayout.Button ("v")) {
if (i >= 0) {
list.MoveArrayElement (i, i + 1);
}
}
if (GUILayout.Button ("^")) {
if (i < list.arraySize) {
list.MoveArrayElement (i, i - 1);
}
}
if (GUILayout.Button ("+")) {
manager.addNewWayPointAtIndex (i);
}
GUILayout.EndHorizontal ();
GUILayout.EndHorizontal ();
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Rename Waypoints")) {
manager.renameWaypoints ();
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Reset Waypoints Position")) {
manager.resetWaypointsPositions ();
}
}
}
}
#endif

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 3176065b933d8274e8386e2854600125
timeCreated: 1517687097
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/WaypointCircuitEditor.cs
uploadId: 814740

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 5c94d8db21de9fa48aff084dfc3c28fc
timeCreated: 1578453332
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/actionSystemEditor.cs
uploadId: 814740

View File

@@ -0,0 +1,349 @@
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using System.IO;
using UnityEngine.EventSystems;
#if UNITY_EDITOR
using UnityEditor;
public class addMeleeShieldToCharacterEditor : EditorWindow
{
GUISkin guiSkin;
Rect windowRect = new Rect ();
Event currentEvent;
Vector2 rectSize = new Vector2 (600, 600);
bool shieldAdded;
float timeToBuild = 0.2f;
float timer;
string prefabsPath = "";
GUIStyle style = new GUIStyle ();
float windowHeightPercentage = 0.38f;
Vector2 screenResolution;
playerComponentsManager mainPlayerComponentsManager;
meleeWeaponsGrabbedManager mainMeleeWeaponsGrabbedManager;
public string[] shieldList;
public int shieldIndex;
string newshieldName;
bool shieldListAssigned;
public bool useCustomShieldPrefabPath;
public string customShieldPrefabPath;
Vector2 scrollPos1;
float maxLayoutWidht = 220;
bool closeWindowAfterAddingObjectToCharacter = true;
[MenuItem ("Game Kit Controller/Add Weapon To Character/Add Melee Shield To Character", false, 204)]
public static void addMeleeShieldToCharacter ()
{
GetWindow<addMeleeShieldToCharacterEditor> ();
}
void OnEnable ()
{
shieldListAssigned = false;
newshieldName = "";
screenResolution = new Vector2 (Screen.currentResolution.width, Screen.currentResolution.height);
// Debug.Log (screenResolution + " " + partsHeight + " " + settingsHeight + " " + previewHeight);
float totalHeight = screenResolution.y * windowHeightPercentage;
if (totalHeight < 500) {
totalHeight = 500;
}
rectSize = new Vector2 (600, totalHeight);
prefabsPath = pathInfoValues.getMeleeShieldObjectPath ();
customShieldPrefabPath = prefabsPath;
resetCreatorValues ();
checkCurrentShieldSelected (Selection.activeGameObject);
}
void checkCurrentShieldSelected (GameObject currentCharacterSelected)
{
if (currentCharacterSelected) {
mainPlayerComponentsManager = currentCharacterSelected.GetComponentInChildren<playerComponentsManager> ();
if (mainPlayerComponentsManager != null) {
mainMeleeWeaponsGrabbedManager = mainPlayerComponentsManager.getMeleeWeaponsGrabbedManager ();
if (!Directory.Exists (prefabsPath)) {
Debug.Log ("WARNING: " + prefabsPath + " path doesn't exist, make sure the path is from an existing folder in the project");
return;
}
string[] search_results = null;
search_results = System.IO.Directory.GetFiles (prefabsPath, "*.prefab");
if (search_results.Length > 0) {
shieldList = new string[search_results.Length];
int currentShieldIndex = 0;
foreach (string file in search_results) {
//must convert file path to relative-to-unity path (and watch for '\' character between Win/Mac)
GameObject currentPrefab = UnityEditor.AssetDatabase.LoadAssetAtPath (file, typeof(GameObject)) as GameObject;
if (currentPrefab) {
string currentShieldName = currentPrefab.name;
shieldList [currentShieldIndex] = currentShieldName;
currentShieldIndex++;
} else {
Debug.Log ("WARNING: something went wrong when trying to get the prefab in the path " + file);
}
}
shieldListAssigned = true;
} else {
Debug.Log ("Shield prefab not found in path " + prefabsPath);
shieldList = new string[0];
}
}
}
}
void OnDisable ()
{
resetCreatorValues ();
}
void resetCreatorValues ()
{
if (shieldAdded) {
} else {
}
mainMeleeWeaponsGrabbedManager = null;
shieldAdded = false;
shieldListAssigned = false;
mainPlayerComponentsManager = null;
useCustomShieldPrefabPath = false;
Debug.Log ("Shield window closed");
}
void OnGUI ()
{
if (!guiSkin) {
guiSkin = Resources.Load ("GUI") as GUISkin;
}
GUI.skin = guiSkin;
this.minSize = rectSize;
this.titleContent = new GUIContent ("Shields", null, "Add Melee Shield To Character");
GUILayout.BeginVertical ("Add Melee Shield To Character", "window");
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
windowRect = GUILayoutUtility.GetLastRect ();
// windowRect.position = new Vector2 (0, windowRect.position.y);
windowRect.width = this.maxSize.x;
GUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox ("", MessageType.Info);
style = new GUIStyle (EditorStyles.helpBox);
style.richText = true;
style.fontStyle = FontStyle.Bold;
style.fontSize = 17;
EditorGUILayout.LabelField ("Select a Shield from the 'Melee Shield To Add' list and press the button 'Add Melee Shield To Character'. \n\n" +
"If not character is selected in the hierarchy, select one and press the button 'Check Current Object Selected'.\n\n", style);
GUILayout.EndHorizontal ();
if (mainMeleeWeaponsGrabbedManager == null) {
GUILayout.FlexibleSpace ();
GUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox ("", MessageType.Warning);
style = new GUIStyle (EditorStyles.helpBox);
style.richText = true;
style.fontStyle = FontStyle.Bold;
style.fontSize = 17;
EditorGUILayout.LabelField ("WARNING: No Character was found, make sure to select the player or an " +
"humanoid AI to add a Shield to it.", style);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Check Current Object Selected")) {
checkCurrentShieldSelected (Selection.activeGameObject);
}
} else {
if (shieldListAssigned) {
if (shieldList.Length > 0) {
scrollPos1 = EditorGUILayout.BeginScrollView (scrollPos1, false, false);
GUILayout.FlexibleSpace ();
EditorGUILayout.Space ();
if (shieldIndex < shieldList.Length) {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Shield To Add", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
shieldIndex = EditorGUILayout.Popup (shieldIndex, shieldList, GUILayout.ExpandWidth (true));
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
newshieldName = shieldList [shieldIndex];
}
EditorGUILayout.Space ();
showCustomPrefabPathOptions ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Close Wizard Once Shield Added", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
closeWindowAfterAddingObjectToCharacter = (bool)EditorGUILayout.Toggle ("", closeWindowAfterAddingObjectToCharacter);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
EditorGUILayout.EndScrollView ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Add Melee Shield To Character")) {
addShield ();
}
if (GUILayout.Button ("Cancel")) {
this.Close ();
}
}
} else {
GUILayout.FlexibleSpace ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox ("", MessageType.Warning);
style = new GUIStyle (EditorStyles.helpBox);
style.richText = true;
style.fontStyle = FontStyle.Bold;
style.fontSize = 17;
EditorGUILayout.LabelField ("WARNING: No Shields prefabs where found on the path " + prefabsPath, style);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
showCustomPrefabPathOptions ();
}
}
GUILayout.EndVertical ();
}
void showCustomPrefabPathOptions ()
{
GUILayout.BeginHorizontal ();
GUILayout.Label ("Use Custom Shield Prefab Path", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
useCustomShieldPrefabPath = (bool)EditorGUILayout.Toggle ("", useCustomShieldPrefabPath);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (useCustomShieldPrefabPath) {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Custom Shield Prefab Path", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
customShieldPrefabPath = EditorGUILayout.TextField ("", customShieldPrefabPath);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Check Prefabs On New Path")) {
prefabsPath = customShieldPrefabPath;
checkCurrentShieldSelected (Selection.activeGameObject);
}
}
}
void addShield ()
{
string pathForShield = prefabsPath + "/" + newshieldName + ".prefab";
GameObject currentPrefab = UnityEditor.AssetDatabase.LoadAssetAtPath (pathForShield, typeof(GameObject)) as GameObject;
if (currentPrefab != null) {
string currentShieldName = currentPrefab.name;
mainMeleeWeaponsGrabbedManager.addNewMeleeShieldPrefab (currentPrefab, currentShieldName);
GKC_Utils.updateDirtyScene ("Melee Shield Added To Character", mainMeleeWeaponsGrabbedManager.gameObject);
Debug.Log ("Shield " + newshieldName + " added to character");
shieldAdded = true;
} else {
Debug.Log ("WARNING: no prefab found on path " + prefabsPath + newshieldName);
}
}
void Update ()
{
if (shieldAdded) {
if (timer < timeToBuild) {
timer += 0.01f;
if (timer > timeToBuild) {
timer = 0;
if (closeWindowAfterAddingObjectToCharacter) {
this.Close ();
} else {
OnEnable ();
}
}
}
}
}
}
#endif

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 6eb6052d054c86f4d99e40f49279f4bc
timeCreated: 1681697609
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/addMeleeShieldToCharacterEditor.cs
uploadId: 814740

View File

@@ -0,0 +1,364 @@
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using System.IO;
using UnityEngine.EventSystems;
#if UNITY_EDITOR
using UnityEditor;
public class addMeleeWeaponToCharacterEditor : EditorWindow
{
GUISkin guiSkin;
Rect windowRect = new Rect ();
Event currentEvent;
Vector2 rectSize = new Vector2 (600, 600);
bool weaponAdded;
float timeToBuild = 0.2f;
float timer;
string prefabsPath = "";
GUIStyle style = new GUIStyle ();
float windowHeightPercentage = 0.38f;
Vector2 screenResolution;
playerComponentsManager mainPlayerComponentsManager;
meleeWeaponsGrabbedManager mainMeleeWeaponsGrabbedManager;
public string[] weaponList;
public int weaponIndex;
string newWeaponName;
bool weaponListAssigned;
public bool useCustomWeaponPrefabPath;
public string customWeaponPrefabPath;
public bool useBowWeaponType;
Vector2 scrollPos1;
float maxLayoutWidht = 220;
bool closeWindowAfterAddingObjectToCharacter = true;
[MenuItem ("Game Kit Controller/Add Weapon To Character/Add Melee Weapon To Character", false, 204)]
public static void addMeleeWeaponToCharacter ()
{
GetWindow<addMeleeWeaponToCharacterEditor> ();
}
void OnEnable ()
{
weaponListAssigned = false;
newWeaponName = "";
screenResolution = new Vector2 (Screen.currentResolution.width, Screen.currentResolution.height);
// Debug.Log (screenResolution + " " + partsHeight + " " + settingsHeight + " " + previewHeight);
float totalHeight = screenResolution.y * windowHeightPercentage;
if (totalHeight < 500) {
totalHeight = 500;
}
rectSize = new Vector2 (600, totalHeight);
prefabsPath = pathInfoValues.getMeleeWeaponObjectPath ();
customWeaponPrefabPath = prefabsPath;
resetCreatorValues ();
checkCurrentWeaponSelected (Selection.activeGameObject);
}
void checkCurrentWeaponSelected (GameObject currentCharacterSelected)
{
if (currentCharacterSelected) {
mainPlayerComponentsManager = currentCharacterSelected.GetComponentInChildren<playerComponentsManager> ();
if (mainPlayerComponentsManager != null) {
mainMeleeWeaponsGrabbedManager = mainPlayerComponentsManager.getMeleeWeaponsGrabbedManager ();
if (!Directory.Exists (prefabsPath)) {
Debug.Log ("WARNING: " + prefabsPath + " path doesn't exist, make sure the path is from an existing folder in the project");
return;
}
string[] search_results = null;
search_results = System.IO.Directory.GetFiles (prefabsPath, "*.prefab");
if (search_results.Length > 0) {
weaponList = new string[search_results.Length];
int currentWeaponIndex = 0;
foreach (string file in search_results) {
//must convert file path to relative-to-unity path (and watch for '\' character between Win/Mac)
GameObject currentPrefab = UnityEditor.AssetDatabase.LoadAssetAtPath (file, typeof(GameObject)) as GameObject;
if (currentPrefab) {
string currentWeaponName = currentPrefab.name;
weaponList [currentWeaponIndex] = currentWeaponName;
currentWeaponIndex++;
} else {
Debug.Log ("WARNING: something went wrong when trying to get the prefab in the path " + file);
}
}
weaponListAssigned = true;
} else {
Debug.Log ("Weapon prefab not found in path " + prefabsPath);
weaponList = new string[0];
}
}
}
}
void OnDisable ()
{
resetCreatorValues ();
}
void resetCreatorValues ()
{
if (weaponAdded) {
} else {
}
mainMeleeWeaponsGrabbedManager = null;
weaponAdded = false;
weaponListAssigned = false;
mainPlayerComponentsManager = null;
useCustomWeaponPrefabPath = false;
useBowWeaponType = false;
Debug.Log ("Weapon window closed");
}
void OnGUI ()
{
if (!guiSkin) {
guiSkin = Resources.Load ("GUI") as GUISkin;
}
GUI.skin = guiSkin;
this.minSize = rectSize;
this.titleContent = new GUIContent ("Weapons", null, "Add Melee Weapon To Character");
GUILayout.BeginVertical ("Add Melee Weapon To Character", "window");
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
windowRect = GUILayoutUtility.GetLastRect ();
// windowRect.position = new Vector2 (0, windowRect.position.y);
windowRect.width = this.maxSize.x;
GUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox ("", MessageType.Info);
style = new GUIStyle (EditorStyles.helpBox);
style.richText = true;
style.fontStyle = FontStyle.Bold;
style.fontSize = 17;
EditorGUILayout.LabelField ("Select a weapon from the 'Melee Weapon To Add' list and press the button 'Add Melee Weapon To Character'. \n\n" +
"If not character is selected in the hierarchy, select one and press the button 'Check Current Object Selected'.\n\n", style);
GUILayout.EndHorizontal ();
if (mainMeleeWeaponsGrabbedManager == null) {
GUILayout.FlexibleSpace ();
GUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox ("", MessageType.Warning);
style = new GUIStyle (EditorStyles.helpBox);
style.richText = true;
style.fontStyle = FontStyle.Bold;
style.fontSize = 17;
EditorGUILayout.LabelField ("WARNING: No Character was found, make sure to select the player or an " +
"humanoid AI to add a weapon to it.", style);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Check Current Object Selected")) {
checkCurrentWeaponSelected (Selection.activeGameObject);
}
} else {
if (weaponListAssigned) {
if (weaponList.Length > 0) {
scrollPos1 = EditorGUILayout.BeginScrollView (scrollPos1, false, false);
GUILayout.FlexibleSpace ();
EditorGUILayout.Space ();
if (weaponIndex < weaponList.Length) {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Weapon To Add", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
weaponIndex = EditorGUILayout.Popup (weaponIndex, weaponList, GUILayout.ExpandWidth (true));
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
newWeaponName = weaponList [weaponIndex];
}
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Weapon Is Bow Type", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
useBowWeaponType = (bool)EditorGUILayout.Toggle ("", useBowWeaponType);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
showCustomPrefabPathOptions ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Close Wizard Once Weapon Added", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
closeWindowAfterAddingObjectToCharacter = (bool)EditorGUILayout.Toggle ("", closeWindowAfterAddingObjectToCharacter);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
EditorGUILayout.EndScrollView ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Add Melee Weapon To Character")) {
addWeapon ();
}
if (GUILayout.Button ("Cancel")) {
this.Close ();
}
}
} else {
GUILayout.FlexibleSpace ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox ("", MessageType.Warning);
style = new GUIStyle (EditorStyles.helpBox);
style.richText = true;
style.fontStyle = FontStyle.Bold;
style.fontSize = 17;
EditorGUILayout.LabelField ("WARNING: No weapons prefabs where found on the path " + prefabsPath, style);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
showCustomPrefabPathOptions ();
}
}
GUILayout.EndVertical ();
}
void showCustomPrefabPathOptions ()
{
GUILayout.BeginHorizontal ();
GUILayout.Label ("Use Custom Weapon Prefab Path", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
useCustomWeaponPrefabPath = (bool)EditorGUILayout.Toggle ("", useCustomWeaponPrefabPath);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (useCustomWeaponPrefabPath) {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Custom Weapon Prefab Path", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
customWeaponPrefabPath = EditorGUILayout.TextField ("", customWeaponPrefabPath);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Check Prefabs On New Path")) {
prefabsPath = customWeaponPrefabPath;
checkCurrentWeaponSelected (Selection.activeGameObject);
}
}
}
void addWeapon ()
{
string pathForWeapon = prefabsPath + newWeaponName + ".prefab";
GameObject currentPrefab = UnityEditor.AssetDatabase.LoadAssetAtPath (pathForWeapon, typeof(GameObject)) as GameObject;
if (currentPrefab != null) {
grabPhysicalObjectMeleeAttackSystem currentGrabPhysicalObjectMeleeAttackSystem = currentPrefab.GetComponent<grabPhysicalObjectMeleeAttackSystem> ();
if (currentGrabPhysicalObjectMeleeAttackSystem != null) {
string currentWeaponName = currentGrabPhysicalObjectMeleeAttackSystem.weaponName;
mainMeleeWeaponsGrabbedManager.addNewMeleeWeaponPrefab (currentPrefab, currentWeaponName, useBowWeaponType);
GKC_Utils.updateDirtyScene ("Melee Weapon Added To Character", mainMeleeWeaponsGrabbedManager.gameObject);
Debug.Log ("Weapon " + newWeaponName + " added to character");
}
weaponAdded = true;
} else {
Debug.Log ("WARNING: no prefab found on path " + prefabsPath + newWeaponName);
}
}
void Update ()
{
if (weaponAdded) {
if (timer < timeToBuild) {
timer += 0.01f;
if (timer > timeToBuild) {
timer = 0;
if (closeWindowAfterAddingObjectToCharacter) {
this.Close ();
} else {
OnEnable ();
}
}
}
}
}
}
#endif

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: a7d3be4f05c09b443a5b76cff4b4d4de
timeCreated: 1630222971
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/addMeleeWeaponToCharacterEditor.cs
uploadId: 814740

View File

@@ -0,0 +1,701 @@
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using System.IO;
using UnityEngine.EventSystems;
#if UNITY_EDITOR
using UnityEditor;
public class addNewGenericModelToControllerEditor : EditorWindow
{
GUISkin guiSkin;
Rect windowRect = new Rect ();
Event currentEvent;
Vector2 rectSize = new Vector2 (550, 460);
float timeToBuild = 0.2f;
float timer;
GUIStyle style = new GUIStyle ();
float windowHeightPercentage = 0.42f;
Vector2 screenResolution;
playerComponentsManager mainPlayerComponentsManager;
customCharacterControllerManager mainCustomCharacterControllerManager;
public GameObject newGenericModel;
public string newGenericName;
public Avatar genericModelAvatar;
public RuntimeAnimatorController originalAnimatorController;
public GameObject temporalCharacterCreated;
public bool characterIsAI;
bool componentsLocated;
bool characterAdded;
bool customizatingCharacterSettingsActive;
bool addGenericCharacterPrefab;
bool usePrefabList;
GameObject genericCharacterPrefab;
public string[] prefabList;
public int prefabIndex;
string newPrefabName;
bool prefabListAssigned;
string prefabsPath = "";
string characterPrefabPath;
string AITemplatePath;
string AITemplatePrefabName;
customCharacterControllerBaseBuilder currentCustomCharacterControllerBaseBuilder;
GameObject newCustomCharacterControllerCreatedGameObject;
buildPlayer.settingsInfo currentSettingsInfo;
buildPlayer.settingsInfoCategory currentSettingsInfoCategory;
Vector2 scrollPos1;
float maxLayoutWidht = 220;
[MenuItem ("Game Kit Controller/Generic Models/Add New Generic Model To Controller", false, 2)]
public static void addNewGenericModelToController ()
{
GetWindow<addNewGenericModelToControllerEditor> ();
}
void OnEnable ()
{
prefabListAssigned = false;
newPrefabName = "";
screenResolution = new Vector2 (Screen.currentResolution.width, Screen.currentResolution.height);
// Debug.Log (screenResolution + " " + partsHeight + " " + settingsHeight + " " + previewHeight);
float totalHeight = screenResolution.y * windowHeightPercentage;
if (totalHeight < 500) {
totalHeight = 500;
}
rectSize = new Vector2 (550, totalHeight);
prefabsPath = pathInfoValues.getGenericCharacterPrefabsPath ();
resetCreatorValues ();
checkCurrentCharacterSelected (Selection.activeGameObject);
}
void checkCurrentCharacterSelected (GameObject currentCharacterSelected)
{
if (currentCharacterSelected != null) {
mainPlayerComponentsManager = currentCharacterSelected.GetComponentInChildren<playerComponentsManager> ();
if (mainPlayerComponentsManager != null) {
mainCustomCharacterControllerManager = mainPlayerComponentsManager.getCustomCharacterControllerManager ();
if (mainCustomCharacterControllerManager != null) {
componentsLocated = true;
if (!Directory.Exists (prefabsPath)) {
Debug.Log ("WARNING: " + prefabsPath + " path doesn't exist, make sure the path is from an existing folder in the project");
return;
}
string[] search_results = null;
search_results = System.IO.Directory.GetFiles (prefabsPath, "*.prefab");
if (search_results.Length > 0) {
prefabList = new string[search_results.Length];
int currentPrefabIndex = 0;
foreach (string file in search_results) {
//must convert file path to relative-to-unity path (and watch for '\' character between Win/Mac)
GameObject currentPrefab = UnityEditor.AssetDatabase.LoadAssetAtPath (file, typeof(GameObject)) as GameObject;
if (currentPrefab) {
string currentPrefabName = currentPrefab.name;
prefabList [currentPrefabIndex] = currentPrefabName;
currentPrefabIndex++;
} else {
Debug.Log ("WARNING: something went wrong when trying to get the prefab in the path " + file);
}
}
prefabListAssigned = true;
} else {
Debug.Log ("Prefab not found in path " + prefabsPath);
prefabList = new string[0];
}
}
}
}
}
void OnDisable ()
{
resetCreatorValues ();
}
void resetCreatorValues ()
{
if (!characterAdded) {
if (temporalCharacterCreated != null) {
Debug.Log ("Wizard closed without adding new generic model and temporal character instantiated, removing temporal object");
DestroyImmediate (temporalCharacterCreated);
}
}
newGenericModel = null;
newGenericName = "";
genericModelAvatar = null;
originalAnimatorController = null;
mainCustomCharacterControllerManager = null;
mainPlayerComponentsManager = null;
componentsLocated = false;
characterAdded = false;
customizatingCharacterSettingsActive = false;
characterIsAI = false;
prefabListAssigned = false;
addGenericCharacterPrefab = false;
usePrefabList = false;
temporalCharacterCreated = null;
newCustomCharacterControllerCreatedGameObject = null;
Debug.Log ("Generic Model window closed");
}
void OnGUI ()
{
if (!guiSkin) {
guiSkin = Resources.Load ("GUI") as GUISkin;
}
GUI.skin = guiSkin;
this.minSize = rectSize;
this.titleContent = new GUIContent ("Generic", null, "Add Generic Model To Controller");
GUILayout.BeginVertical ("Add Generic Model To Controller", "window");
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
windowRect = GUILayoutUtility.GetLastRect ();
// windowRect.position = new Vector2 (0, windowRect.position.y);
windowRect.width = this.maxSize.x;
if (customizatingCharacterSettingsActive) {
style.fontStyle = FontStyle.Bold;
style.fontSize = 26;
style.alignment = TextAnchor.MiddleCenter;
if (currentCustomCharacterControllerBaseBuilder != null) {
if (currentCustomCharacterControllerBaseBuilder.settingsInfoCategoryList.Count > 0) {
style.normal.textColor = Color.white;
style.fontStyle = FontStyle.Bold;
style.alignment = TextAnchor.MiddleCenter;
style.fontSize = 18;
GUILayout.Label ("Character Settings Info List", style);
GUILayout.BeginVertical ("", "window");
scrollPos1 = EditorGUILayout.BeginScrollView (scrollPos1, false, false);
for (int i = 0; i < currentCustomCharacterControllerBaseBuilder.settingsInfoCategoryList.Count; i++) {
EditorGUILayout.Space ();
currentSettingsInfoCategory = currentCustomCharacterControllerBaseBuilder.settingsInfoCategoryList [i];
GUILayout.BeginHorizontal (GUILayout.Width (450));
GUILayout.Label (currentSettingsInfoCategory.Name.ToUpper (), style);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
for (int j = 0; j < currentSettingsInfoCategory.settingsInfoList.Count; j++) {
currentSettingsInfo = currentSettingsInfoCategory.settingsInfoList [j];
if (currentSettingsInfo.settingEnabled) {
GUILayout.BeginHorizontal (GUILayout.Width (450));
GUILayout.Label (currentSettingsInfo.Name, EditorStyles.boldLabel);
if (currentSettingsInfo.useBoolState) {
currentSettingsInfo.boolState = (bool)EditorGUILayout.Toggle ("", currentSettingsInfo.boolState);
}
if (currentSettingsInfo.useFloatValue) {
currentSettingsInfo.floatValue = (float)EditorGUILayout.FloatField ("", currentSettingsInfo.floatValue);
}
if (currentSettingsInfo.useStringValue) {
currentSettingsInfo.stringValue = (string)EditorGUILayout.TextField ("", currentSettingsInfo.stringValue);
}
if (currentSettingsInfo.useVector3Value) {
currentSettingsInfo.vector3Value = (Vector3)EditorGUILayout.Vector3Field ("", currentSettingsInfo.vector3Value);
}
if (currentSettingsInfo.useRegularValue) {
currentSettingsInfo.regularValue = (bool)EditorGUILayout.Toggle ("", currentSettingsInfo.regularValue);
}
GUILayout.EndHorizontal ();
if (currentSettingsInfo.useFieldExplanation) {
GUILayout.BeginHorizontal (GUILayout.Width (450));
EditorGUILayout.HelpBox (currentSettingsInfo.fieldExplanation, MessageType.None);
GUILayout.EndHorizontal ();
}
}
}
EditorGUILayout.Space ();
EditorGUILayout.Space ();
}
EditorGUILayout.Space ();
EditorGUILayout.EndScrollView ();
GUILayout.EndVertical ();
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Apply Settings")) {
currentCustomCharacterControllerBaseBuilder.adjustSettings ();
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Close")) {
this.Close ();
}
} else {
this.Close ();
}
} else {
GUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox ("", MessageType.Info);
style = new GUIStyle (EditorStyles.helpBox);
style.richText = true;
style.fontStyle = FontStyle.Bold;
style.fontSize = 17;
EditorGUILayout.LabelField ("Configure the generic model elements and press the button 'Create Character'. \n\n" +
"If not character is selected in the hierarchy, select one and press the button 'Check Current Object Selected'.\n\n" +
"This process is the same on Player or AI, make sure to select the character (player or AI) on the hierarchy to add a generic model to it.", style);
GUILayout.EndHorizontal ();
if (mainCustomCharacterControllerManager == null) {
GUILayout.FlexibleSpace ();
GUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox ("", MessageType.Warning);
style = new GUIStyle (EditorStyles.helpBox);
style.richText = true;
style.fontStyle = FontStyle.Bold;
style.fontSize = 17;
EditorGUILayout.LabelField ("WARNING: No Character was found, make sure to select the player or an " +
"AI to add new generic model to it.", style);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Check Current Object Selected")) {
checkCurrentCharacterSelected (Selection.activeGameObject);
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Add Enemy AI Prefab In Scene For Generic Model")) {
addAIPrefabToConfigureNewGenericModel (true, false);
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Add Friend AI Prefab In Scene For Generic Model")) {
addAIPrefabToConfigureNewGenericModel (false, false);
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Add Neutral AI Prefab In Scene For Generic Model")) {
addAIPrefabToConfigureNewGenericModel (false, true);
}
} else {
if (componentsLocated) {
GUILayout.FlexibleSpace ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("box");
GUILayout.BeginHorizontal ();
GUILayout.Label ("Use Generic Character Prefab", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
addGenericCharacterPrefab = (bool)EditorGUILayout.Toggle ("", addGenericCharacterPrefab, GUILayout.ExpandWidth (true));
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Character Name", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
newGenericName = (string)EditorGUILayout.TextField (newGenericName, GUILayout.ExpandWidth (true));
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (addGenericCharacterPrefab) {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Use Prefab List", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
usePrefabList = (bool)EditorGUILayout.Toggle (usePrefabList);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (usePrefabList) {
if (prefabListAssigned) {
if (prefabList.Length > 0) {
GUILayout.FlexibleSpace ();
EditorGUILayout.Space ();
if (prefabIndex < prefabList.Length) {
prefabIndex = EditorGUILayout.Popup ("Generic Model Prefab", prefabIndex, prefabList);
newPrefabName = prefabList [prefabIndex];
}
}
}
} else {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Generic Character Prefab", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
genericCharacterPrefab = EditorGUILayout.ObjectField (genericCharacterPrefab, typeof(GameObject), true, GUILayout.ExpandWidth (true)) as GameObject;
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
}
} else {
windowRect = GUILayoutUtility.GetLastRect ();
// windowRect.position = new Vector2 (0, windowRect.position.y);
windowRect.width = this.maxSize.x;
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Generic Model", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
newGenericModel = EditorGUILayout.ObjectField (newGenericModel, typeof(GameObject), true, GUILayout.ExpandWidth (true)) as GameObject;
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Generic Avatar", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
genericModelAvatar = EditorGUILayout.ObjectField (genericModelAvatar, typeof(Avatar), true, GUILayout.ExpandWidth (true)) as Avatar;
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Animator Controller", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
originalAnimatorController = EditorGUILayout.ObjectField (originalAnimatorController, typeof(RuntimeAnimatorController), true, GUILayout.ExpandWidth (true)) as RuntimeAnimatorController;
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
}
GUILayout.BeginHorizontal ();
GUILayout.Label ("Character is AI", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
characterIsAI = (bool)EditorGUILayout.Toggle (characterIsAI, GUILayout.ExpandWidth (true));
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.EndVertical ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("Cancel")) {
this.Close ();
}
string textButton = "Create Character";
if (addGenericCharacterPrefab) {
textButton = "Add Character";
}
if (GUILayout.Button (textButton)) {
if (addGenericCharacterPrefab) {
if (usePrefabList) {
if (prefabListAssigned) {
addCharacter ();
return;
} else {
Debug.Log ("WARNING: Not all elements for the new character have been assigned, make sure to add the proper fileds to it");
}
} else {
if (genericCharacterPrefab != null &&
newGenericName != "") {
addCharacter ();
return;
} else {
Debug.Log ("WARNING: Not all elements for the new character have been assigned, make sure to add the proper fileds to it");
}
}
} else {
if (newGenericModel != null &&
originalAnimatorController != null &&
genericModelAvatar != null &&
newGenericName != "") {
addCharacter ();
return;
} else {
Debug.Log ("WARNING: Not all elements for the new character have been assigned, make sure to add the proper fileds to it");
}
}
}
GUILayout.EndHorizontal ();
}
}
}
GUILayout.EndVertical ();
}
void addAIPrefabToConfigureNewGenericModel (bool AIIsEnemy, bool isNeutral)
{
characterPrefabPath = pathInfoValues.getMainPrefabsFolderPath ();
AITemplatePath = pathInfoValues.getMainAIPrefabSubFolderPath ();
AITemplatePrefabName = pathInfoValues.getMainAIPrefabName ();
string characterName = AITemplatePrefabName;
string prefabPath = characterPrefabPath + AITemplatePath;
prefabPath += characterName;
prefabPath += ".prefab";
GameObject newCharacterPrefabObject = (GameObject)AssetDatabase.LoadAssetAtPath (prefabPath, typeof(GameObject));
if (newCharacterPrefabObject != null) {
GameObject newCharacterObject = GameObject.Instantiate (newCharacterPrefabObject, Vector3.zero, Quaternion.identity) as GameObject;
newCustomCharacterControllerCreatedGameObject = newCharacterObject;
newCharacterObject.name = newCharacterPrefabObject.name;
checkCurrentCharacterSelected (newCharacterObject);
temporalCharacterCreated = newCharacterObject;
buildPlayer currentBuildPlayer = newCharacterObject.GetComponent<buildPlayer> ();
if (currentBuildPlayer != null) {
currentBuildPlayer.setCharacterValuesAndAdjustSettingsExternally (false, true, AIIsEnemy, isNeutral, "Combat", false,
false, false, false);
}
} else {
Debug.Log ("Prefab on path " + prefabPath + " not found");
}
}
void addCharacter ()
{
if (addGenericCharacterPrefab) {
customCharacterControllerBase currentCustomCharacterControllerBase = null;
if (usePrefabList) {
string pathForObject = prefabsPath + newPrefabName + ".prefab";
GameObject currentPrefab = UnityEditor.AssetDatabase.LoadAssetAtPath (pathForObject, typeof(GameObject)) as GameObject;
if (currentPrefab != null) {
currentCustomCharacterControllerBase = currentPrefab.GetComponent<customCharacterControllerBase> ();
}
} else {
currentCustomCharacterControllerBase = genericCharacterPrefab.GetComponent<customCharacterControllerBase> ();
}
if (currentCustomCharacterControllerBase != null) {
currentCustomCharacterControllerBase.setAIValues = characterIsAI;
mainCustomCharacterControllerManager.addNewCustomCharacterControllerToSpawn (currentCustomCharacterControllerBase.gameObject, newGenericName);
if (mainCustomCharacterControllerManager != null) {
GKC_Utils.setActiveGameObjectInEditor (mainCustomCharacterControllerManager.gameObject);
}
}
} else {
GameObject newCustomCharacterObject = (GameObject)Instantiate (mainCustomCharacterControllerManager.customCharacterPrefab,
Vector3.zero, Quaternion.identity, mainCustomCharacterControllerManager.transform);
newCustomCharacterObject.transform.localPosition = Vector3.zero;
newCustomCharacterObject.transform.localRotation = Quaternion.identity;
newCustomCharacterObject.name = "Custom Character Controller " + newGenericName;
customCharacterControllerBase currentCustomCharacterControllerBase = newCustomCharacterObject.GetComponent<customCharacterControllerBase> ();
GameObject genericModelCreated = (GameObject)Instantiate (newGenericModel, Vector3.zero, Quaternion.identity, currentCustomCharacterControllerBase.gameObject.transform);
genericModelCreated.transform.localPosition = Vector3.zero;
genericModelCreated.transform.localRotation = Quaternion.identity;
Animator genericModelAnimator = genericModelCreated.GetComponent<Animator> ();
genericModelAnimator.enabled = false;
currentCustomCharacterControllerBase.originalAnimatorController = originalAnimatorController;
currentCustomCharacterControllerBase.originalAvatar = genericModelAvatar;
currentCustomCharacterControllerBase.characterGameObject = genericModelCreated;
currentCustomCharacterControllerBase.characterMeshesList.Add (genericModelCreated);
genericModelCreated.SetActive (false);
currentCustomCharacterControllerBase.setNewCameraStates = true;
currentCustomCharacterControllerBase.newCameraStateThirdPerson = newGenericName + " View Third Person";
currentCustomCharacterControllerBase.newCameraStateFirstPerson = newGenericName + " View First Person";
currentCustomCharacterControllerBase.customRagdollInfoName = newGenericName + " Ragdoll";
playerController mainPlayerController = mainPlayerComponentsManager.getPlayerController ();
currentCustomCharacterControllerBase.mainAnimator = mainPlayerController.getCharacterAnimator ();
currentCustomCharacterControllerBase.setAIValues = characterIsAI;
mainCustomCharacterControllerManager.addNewCustomCharacterController (currentCustomCharacterControllerBase, newGenericName);
genericRagdollBuilder currentGenericRagdollBuilder = newCustomCharacterObject.GetComponent<genericRagdollBuilder> ();
if (currentGenericRagdollBuilder != null) {
currentGenericRagdollBuilder.ragdollName = newGenericName + " Ragdoll";
currentGenericRagdollBuilder.characterBody = currentCustomCharacterControllerBase.characterGameObject;
currentGenericRagdollBuilder.mainRagdollActivator = mainPlayerComponentsManager.getRagdollActivator ();
GKC_Utils.updateComponent (currentGenericRagdollBuilder);
GKC_Utils.updateDirtyScene ("Update Generic Ragdoll elements", currentGenericRagdollBuilder.gameObject);
}
followObjectPositionSystem currentFollowObjectPositionSystem = newCustomCharacterObject.GetComponentInChildren<followObjectPositionSystem> ();
if (currentFollowObjectPositionSystem != null) {
currentFollowObjectPositionSystem.setObjectToFollowFromEditor (mainPlayerController.transform);
GKC_Utils.updateComponent (currentFollowObjectPositionSystem);
GKC_Utils.updateDirtyScene ("Update Follow Object Position elements", currentFollowObjectPositionSystem.gameObject);
}
newCustomCharacterControllerCreatedGameObject = newCustomCharacterObject;
if (newCustomCharacterControllerCreatedGameObject != null) {
GKC_Utils.setActiveGameObjectInEditor (newCustomCharacterControllerCreatedGameObject);
}
}
characterAdded = true;
}
void Update ()
{
if (characterAdded && !customizatingCharacterSettingsActive) {
if (timer < timeToBuild) {
timer += 0.01f;
if (timer > timeToBuild) {
timer = 0;
customizatingCharacterSettingsActive = true;
if (newCustomCharacterControllerCreatedGameObject != null) {
currentCustomCharacterControllerBaseBuilder = newCustomCharacterControllerCreatedGameObject.GetComponent<customCharacterControllerBaseBuilder> ();
}
Repaint ();
}
}
}
}
}
#endif

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 8661f842227e4cc40aaf9e454925c7e5
timeCreated: 1632027772
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/addNewGenericModelToControllerEditor.cs
uploadId: 814740

View File

@@ -0,0 +1,52 @@
using UnityEngine;
using System.Collections;
#if UNITY_EDITOR
using UnityEditor;
[CustomEditor (typeof(addPatrolSystemToAI))]
public class addPatrolSystemToAIEditor : Editor
{
addPatrolSystemToAI manager;
void OnEnable ()
{
manager = (addPatrolSystemToAI)target;
}
public override void OnInspectorGUI ()
{
DrawDefaultInspector ();
EditorGUILayout.Space ();
GUILayout.Label ("EDITOR BUTTONS", EditorStyles.boldLabel);
EditorGUILayout.Space ();
if (GUILayout.Button ("Add Patrol System To AI")) {
manager.addPatrolSystem ();
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Assign AI Waypoint Patrol")) {
manager.assignAIWaypointPatrol ();
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Enable Patrol On AI")) {
manager.enableOrdisablePatrolOnAI (true);
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Disable Patrol On AI")) {
manager.enableOrdisablePatrolOnAI (false);
}
EditorGUILayout.Space ();
}
}
#endif

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 8f840316c11711a4c95238da903e1d89
timeCreated: 1573436745
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/addPatrolSystemToAIEditor.cs
uploadId: 814740

View File

@@ -0,0 +1,332 @@
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using System.IO;
using UnityEngine.EventSystems;
#if UNITY_EDITOR
using UnityEditor;
public class addSliceSystemToCharacterCreatorEditor : EditorWindow
{
GUISkin guiSkin;
Rect windowRect = new Rect ();
Vector2 rectSize = new Vector2 (550, 600);
bool sliceSystemAdded;
float timeToBuild = 0.2f;
float timer;
GUIStyle style = new GUIStyle ();
float windowHeightPercentage = 0.5f;
Vector2 screenResolution;
playerController currentPlayerController;
bool characterSelected;
string prefabsPath = "";
string sliceRagdollName = "Ragdoll (With Slice System)";
public GameObject currentRagdollPrefab;
public Material sliceMaterial;
public GameObject characterMeshForRagdollPrefab;
public bool setTagOnSkeletonRigidbodies = true;
public string tagOnSkeletonRigidbodies = "box";
bool ragdollPrefabCreated;
float maxLayoutWidht = 250;
[MenuItem ("Game Kit Controller/Add Slice System To Character", false, 24)]
public static void addSliceSystemToCharacter ()
{
GetWindow<addSliceSystemToCharacterCreatorEditor> ();
}
void OnEnable ()
{
screenResolution = new Vector2 (Screen.currentResolution.width, Screen.currentResolution.height);
// Debug.Log (screenResolution + " " + partsHeight + " " + settingsHeight + " " + previewHeight);
float totalHeight = screenResolution.y * windowHeightPercentage;
if (totalHeight < 400) {
totalHeight = 400;
}
rectSize = new Vector2 (550, totalHeight);
resetCreatorValues ();
prefabsPath = pathInfoValues.getSliceObjectsPrefabsPath ();
checkCurrentCharacterSelected (Selection.activeGameObject);
}
void checkCurrentCharacterSelected (GameObject currentCharacterSelected)
{
if (currentCharacterSelected) {
if (!Directory.Exists (prefabsPath)) {
Debug.Log ("WARNING: " + prefabsPath + " path doesn't exist, make sure the path is from an existing folder in the project");
return;
}
string pathForRagdoll = prefabsPath + "/" + sliceRagdollName + ".prefab";
currentRagdollPrefab = UnityEditor.AssetDatabase.LoadAssetAtPath (pathForRagdoll, typeof(GameObject)) as GameObject;
currentPlayerController = currentCharacterSelected.GetComponentInChildren<playerController> ();
if (currentPlayerController != null) {
Debug.Log ("Character Selected on creator opened");
characterSelected = true;
} else {
characterSelected = false;
Debug.Log ("No Character Selected on creator opened");
}
}
}
void OnDisable ()
{
resetCreatorValues ();
}
void resetCreatorValues ()
{
currentPlayerController = null;
characterSelected = false;
sliceSystemAdded = false;
ragdollPrefabCreated = false;
Debug.Log ("Slice System window closed");
}
void OnGUI ()
{
if (!guiSkin) {
guiSkin = Resources.Load ("GUI") as GUISkin;
}
GUI.skin = guiSkin;
this.minSize = rectSize;
this.titleContent = new GUIContent ("Slice System", null, "Add Slice System To Character");
GUILayout.BeginVertical ("Add Slice System Window", "window");
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
windowRect = GUILayoutUtility.GetLastRect ();
// windowRect.position = new Vector2 (0, windowRect.position.y);
windowRect.width = this.maxSize.x;
if (!characterSelected) {
GUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox ("", MessageType.Info);
style = new GUIStyle (EditorStyles.helpBox);
style.richText = true;
style.fontStyle = FontStyle.Bold;
style.fontSize = 15;
EditorGUILayout.LabelField ("If not character is selected in the hierarchy, select one and press the button 'Check Current Object Selected'.\n\n", style);
GUILayout.EndHorizontal ();
GUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox ("", MessageType.Warning);
style = new GUIStyle (EditorStyles.helpBox);
style.richText = true;
style.fontStyle = FontStyle.Bold;
style.fontSize = 15;
EditorGUILayout.LabelField ("WARNING: No Character was found, make sure to select the player or an " +
"humanoid AI to add the slice system to it.", style);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.FlexibleSpace ();
if (GUILayout.Button ("Check Current Character Selected")) {
checkCurrentCharacterSelected (Selection.activeGameObject);
}
} else {
GUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox ("", MessageType.Info);
style = new GUIStyle (EditorStyles.helpBox);
style.richText = true;
style.fontStyle = FontStyle.Bold;
style.fontSize = 15;
EditorGUILayout.LabelField ("You can create the ragdoll prefab for this character, which will be used" +
" when each slice is applied, to instantiate a new ragdoll with those settings and mesh.\n\n" +
"Just select a prefab character mesh on the field 'Character Mesh For Ragdoll' and press the button 'Create Ragdoll Prefab'.\n\n" +
"By default, there is already one selected, but you may want to create a new ragdoll prefab if you are using a new character mesh.", style);
GUILayout.EndHorizontal ();
GUILayout.FlexibleSpace ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Ragdoll Prefab", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentRagdollPrefab = EditorGUILayout.ObjectField (currentRagdollPrefab,
typeof(GameObject), true, GUILayout.ExpandWidth (true)) as GameObject;
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Slice Material", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
sliceMaterial = EditorGUILayout.ObjectField (sliceMaterial,
typeof(Material), true, GUILayout.ExpandWidth (true)) as Material;
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Character Mesh For Ragdoll Prefab", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
characterMeshForRagdollPrefab = EditorGUILayout.ObjectField (characterMeshForRagdollPrefab,
typeof(GameObject), true, GUILayout.ExpandWidth (true)) as GameObject;
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Set Tag On Skeleton", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
setTagOnSkeletonRigidbodies = EditorGUILayout.Toggle (setTagOnSkeletonRigidbodies);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (setTagOnSkeletonRigidbodies) {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Tag On Skeleton", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
tagOnSkeletonRigidbodies = EditorGUILayout.TextField (tagOnSkeletonRigidbodies, GUILayout.ExpandWidth (true));
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
}
EditorGUILayout.Space ();
EditorGUILayout.Space ();
if (characterMeshForRagdollPrefab != null && !ragdollPrefabCreated) {
if (GUILayout.Button ("Create Ragdoll Prefab")) {
createRagdollPrefab ();
}
}
if (GUILayout.Button ("Add Slice System To Character")) {
addSliceSystem ();
}
if (GUILayout.Button ("Cancel")) {
this.Close ();
}
}
GUILayout.EndVertical ();
}
void addSliceSystem ()
{
if (currentRagdollPrefab) {
GameObject playerControllerGameObject = currentPlayerController.gameObject;
surfaceToSlice currentSurfaceToSlice = playerControllerGameObject.GetComponent<surfaceToSlice> ();
if (currentSurfaceToSlice == null || currentSurfaceToSlice.getMainSimpleSliceSystem () == null) {
if (currentSurfaceToSlice == null) {
currentSurfaceToSlice = playerControllerGameObject.AddComponent<surfaceToSlice> ();
}
GameObject characterMesh = currentPlayerController.getCharacterMeshGameObject ().transform.parent.gameObject;
simpleSliceSystem currentSimpleSliceSystem = characterMesh.AddComponent<simpleSliceSystem> ();
currentSimpleSliceSystem.searchBodyParts ();
currentSimpleSliceSystem.mainSurfaceToSlice = currentSurfaceToSlice;
currentSimpleSliceSystem.objectToSlice = characterMesh;
currentSurfaceToSlice.setMainSimpleSliceSystem (currentSimpleSliceSystem.gameObject);
currentSurfaceToSlice.objectIsCharacter = true;
currentSimpleSliceSystem.objectToSlice = characterMesh;
currentSimpleSliceSystem.alternatePrefab = currentRagdollPrefab;
currentSimpleSliceSystem.infillMaterial = sliceMaterial;
GKC_Utils.updateComponent (currentSimpleSliceSystem);
GKC_Utils.updateDirtyScene ("Set slice system info", currentSimpleSliceSystem.gameObject);
Debug.Log ("Slice System added to character");
GKC_Utils.updateDirtyScene ("Add Slice To Character", characterMesh);
} else {
Debug.Log ("Slice System was already configured in this character");
}
sliceSystemAdded = true;
} else {
Debug.Log ("WARNING: no prefab for ragdoll found on path " + prefabsPath + "/" + sliceRagdollName);
}
}
void createRagdollPrefab ()
{
currentRagdollPrefab = GKC_Utils.createSliceRagdollPrefab (characterMeshForRagdollPrefab, prefabsPath, sliceMaterial, setTagOnSkeletonRigidbodies, tagOnSkeletonRigidbodies);
ragdollPrefabCreated = currentRagdollPrefab != null;
}
void Update ()
{
if (sliceSystemAdded) {
if (timer < timeToBuild) {
timer += 0.01f;
if (timer > timeToBuild) {
timer = 0;
this.Close ();
}
}
}
}
}
#endif

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 181b6b4a7f9ef314893572c98b1b58d2
timeCreated: 1600153221
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/addSliceSystemToCharacterCreatorEditor.cs
uploadId: 814740

View File

@@ -0,0 +1,496 @@
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using System.IO;
using UnityEngine.EventSystems;
#if UNITY_EDITOR
using UnityEditor;
public class addWeaponToCharacterEditor : EditorWindow
{
GUISkin guiSkin;
Rect windowRect = new Rect ();
Event currentEvent;
Vector2 rectSize = new Vector2 (600, 600);
bool weaponAdded;
float timeToBuild = 0.2f;
float timer;
string prefabsPath = "";
public GameObject weaponGameObject;
GUIStyle style = new GUIStyle ();
GUIStyle labelStyle = new GUIStyle ();
float windowHeightPercentage = 0.5f;
Vector2 screenResolution;
playerWeaponsManager currentPlayerWeaponsManager;
Transform currentPlayerWeaponsParent;
public string[] weaponList;
public int weaponIndex;
string newWeaponName;
bool weaponListAssigned;
public bool removeAttachmentSystemFromWeapon;
public bool removeWeapon3dHudPanel;
public bool weaponUsedOnAI;
public float newWeaponDamage;
public int newAmmoAmount;
public float newFireRate;
public bool useInfiniteAmmoAmount;
public bool useCustomWeaponPrefabPath;
public string customWeaponPrefabPath;
Vector2 scrollPos1;
float maxLayoutWidht = 220;
bool closeWindowAfterAddingObjectToCharacter = true;
[MenuItem ("Game Kit Controller/Add Weapon To Character/Add Fire Weapon To Character", false, 205)]
public static void addWeaponToCharacter ()
{
GetWindow<addWeaponToCharacterEditor> ();
}
void OnEnable ()
{
weaponListAssigned = false;
newWeaponName = "";
screenResolution = new Vector2 (Screen.currentResolution.width, Screen.currentResolution.height);
// Debug.Log (screenResolution + " " + partsHeight + " " + settingsHeight + " " + previewHeight);
float totalHeight = screenResolution.y * windowHeightPercentage;
if (totalHeight < 500) {
totalHeight = 500;
}
rectSize = new Vector2 (600, totalHeight);
prefabsPath = pathInfoValues.getUsableWeaponsPrefabsPath () + "/";
customWeaponPrefabPath = prefabsPath;
resetCreatorValues ();
checkCurrentWeaponSelected (Selection.activeGameObject);
}
void checkCurrentWeaponSelected (GameObject currentCharacterSelected)
{
if (currentCharacterSelected != null) {
currentPlayerWeaponsManager = currentCharacterSelected.GetComponentInChildren<playerWeaponsManager> ();
if (currentPlayerWeaponsManager != null) {
currentPlayerWeaponsParent = currentPlayerWeaponsManager.getWeaponsParent ();
if (!Directory.Exists (prefabsPath)) {
Debug.Log ("WARNING: " + prefabsPath + " path doesn't exist, make sure the path is from an existing folder in the project");
return;
}
string[] search_results = null;
search_results = System.IO.Directory.GetFiles (prefabsPath, "*.prefab");
if (search_results.Length > 0) {
weaponList = new string[search_results.Length];
int currentWeaponIndex = 0;
foreach (string file in search_results) {
//must convert file path to relative-to-unity path (and watch for '\' character between Win/Mac)
GameObject currentPrefab = UnityEditor.AssetDatabase.LoadAssetAtPath (file, typeof(GameObject)) as GameObject;
if (currentPrefab) {
string currentWeaponName = currentPrefab.name;
weaponList [currentWeaponIndex] = currentWeaponName;
currentWeaponIndex++;
} else {
Debug.Log ("WARNING: something went wrong when trying to get the prefab in the path " + file);
}
}
weaponListAssigned = true;
} else {
Debug.Log ("Weapon prefab not found in path " + prefabsPath);
weaponList = new string[0];
}
}
}
}
void OnDisable ()
{
resetCreatorValues ();
}
void resetCreatorValues ()
{
if (weaponAdded) {
} else {
}
currentPlayerWeaponsManager = null;
weaponAdded = false;
weaponListAssigned = false;
removeAttachmentSystemFromWeapon = false;
removeWeapon3dHudPanel = false;
weaponUsedOnAI = false;
newWeaponDamage = 0;
newAmmoAmount = 0;
useInfiniteAmmoAmount = false;
newFireRate = 0;
useCustomWeaponPrefabPath = false;
Debug.Log ("Weapon window closed");
}
void OnGUI ()
{
if (!guiSkin) {
guiSkin = Resources.Load ("GUI") as GUISkin;
}
GUI.skin = guiSkin;
this.minSize = rectSize;
this.titleContent = new GUIContent ("Weapons", null, "Add Weapon To Character");
GUILayout.BeginVertical ("Add Fire Weapon To Character", "window");
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
windowRect = GUILayoutUtility.GetLastRect ();
// windowRect.position = new Vector2 (0, windowRect.position.y);
windowRect.width = this.maxSize.x;
GUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox ("", MessageType.Info);
style = new GUIStyle (EditorStyles.helpBox);
style.richText = true;
style.fontStyle = FontStyle.Bold;
style.fontSize = 17;
EditorGUILayout.LabelField ("Select a weapon from the 'Weapon To Add' list and press the button 'Add Weapon To Character'. \n\n" +
"If not character is selected in the hierarchy, select one and press the button 'Check Current Object Selected'.\n\n", style);
GUILayout.EndHorizontal ();
if (currentPlayerWeaponsManager == null) {
GUILayout.FlexibleSpace ();
GUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox ("", MessageType.Warning);
style = new GUIStyle (EditorStyles.helpBox);
style.richText = true;
style.fontStyle = FontStyle.Bold;
style.fontSize = 17;
EditorGUILayout.LabelField ("WARNING: No Character was found, make sure to select the player or an " +
"humanoid AI to add a weapon to it.", style);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Check Current Object Selected")) {
checkCurrentWeaponSelected (Selection.activeGameObject);
}
} else {
if (weaponListAssigned) {
if (weaponList.Length > 0) {
scrollPos1 = EditorGUILayout.BeginScrollView (scrollPos1, false, false);
GUILayout.FlexibleSpace ();
EditorGUILayout.Space ();
if (weaponIndex < weaponList.Length) {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Weapon To Add", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
weaponIndex = EditorGUILayout.Popup (weaponIndex, weaponList, GUILayout.ExpandWidth (true));
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
newWeaponName = weaponList [weaponIndex];
GUILayout.BeginHorizontal ();
GUILayout.Label ("Remove Attachments", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
removeAttachmentSystemFromWeapon = (bool)EditorGUILayout.Toggle ("", removeAttachmentSystemFromWeapon);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Remove HUD 3d Panel", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
removeWeapon3dHudPanel = (bool)EditorGUILayout.Toggle ("", removeWeapon3dHudPanel);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Weapon Used On AI", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
weaponUsedOnAI = (bool)EditorGUILayout.Toggle (weaponUsedOnAI);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
labelStyle.fontStyle = FontStyle.Bold;
EditorGUILayout.LabelField ("Weapon Stats", labelStyle);
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("New Weapon Damage", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
newWeaponDamage = (float)EditorGUILayout.FloatField (newWeaponDamage);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Infinite Ammo", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
useInfiniteAmmoAmount = (bool)EditorGUILayout.Toggle (useInfiniteAmmoAmount);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (!useInfiniteAmmoAmount) {
GUILayout.BeginHorizontal ();
GUILayout.Label ("New Ammo Amount", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
newAmmoAmount = (int)EditorGUILayout.IntField (newAmmoAmount);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
}
GUILayout.BeginHorizontal ();
GUILayout.Label ("New Fire Rate", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
newFireRate = (float)EditorGUILayout.FloatField (newFireRate);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
}
EditorGUILayout.Space ();
showCustomPrefabPathOptions ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Close Wizard Once Weapon Added", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
closeWindowAfterAddingObjectToCharacter = (bool)EditorGUILayout.Toggle ("", closeWindowAfterAddingObjectToCharacter);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
EditorGUILayout.EndScrollView ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Add Weapon To Character")) {
addWeapon ();
}
if (GUILayout.Button ("Cancel")) {
this.Close ();
}
}
} else {
GUILayout.FlexibleSpace ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox ("", MessageType.Warning);
style = new GUIStyle (EditorStyles.helpBox);
style.richText = true;
style.fontStyle = FontStyle.Bold;
style.fontSize = 17;
EditorGUILayout.LabelField ("WARNING: No weapons prefabs where found on the path " + prefabsPath, style);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
showCustomPrefabPathOptions ();
}
}
GUILayout.EndVertical ();
}
void showCustomPrefabPathOptions ()
{
GUILayout.BeginHorizontal ();
GUILayout.Label ("Use Custom Weapon Prefab Path", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
useCustomWeaponPrefabPath = (bool)EditorGUILayout.Toggle ("", useCustomWeaponPrefabPath);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (useCustomWeaponPrefabPath) {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Custom Weapon Prefab Path", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
customWeaponPrefabPath = EditorGUILayout.TextField ("", customWeaponPrefabPath);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Check Prefabs On New Path")) {
prefabsPath = customWeaponPrefabPath;
checkCurrentWeaponSelected (Selection.activeGameObject);
}
}
}
void addWeapon ()
{
string pathForWeapon = prefabsPath + newWeaponName + ".prefab";
GameObject currentPrefab = UnityEditor.AssetDatabase.LoadAssetAtPath (pathForWeapon, typeof(GameObject)) as GameObject;
if (currentPrefab != null) {
GameObject newWeaponCreated = (GameObject)Instantiate (currentPrefab, Vector3.zero, Quaternion.identity);
newWeaponCreated.name = newWeaponName;
newWeaponCreated.transform.SetParent (currentPlayerWeaponsParent);
newWeaponCreated.transform.localPosition = Vector3.zero;
newWeaponCreated.transform.localRotation = Quaternion.identity;
weaponAdded = true;
if (removeAttachmentSystemFromWeapon) {
weaponAttachmentSystem currentWeaponAttachmentSystem = newWeaponCreated.GetComponentInChildren<weaponAttachmentSystem> ();
if (currentWeaponAttachmentSystem != null) {
DestroyImmediate (currentWeaponAttachmentSystem.gameObject);
}
}
playerWeaponSystem currentPlayerWeaponSystem = newWeaponCreated.GetComponentInChildren<playerWeaponSystem> ();
if (currentPlayerWeaponSystem != null) {
if (removeWeapon3dHudPanel) {
GameObject weaponHUDGameObject = currentPlayerWeaponSystem.getWeaponHUDGameObject ();
if (weaponHUDGameObject != null) {
DestroyImmediate (weaponHUDGameObject);
}
}
if (newWeaponDamage > 0) {
currentPlayerWeaponSystem.setProjectileDamage (newWeaponDamage);
}
currentPlayerWeaponSystem.setInfiniteAmmoValueFromEditor (useInfiniteAmmoAmount);
if (newAmmoAmount > 0) {
currentPlayerWeaponSystem.setRemainAmmoAmountFromEditor (newAmmoAmount);
}
if (newFireRate > 0) {
currentPlayerWeaponSystem.setFireRateFromEditor (newFireRate);
}
}
if (weaponUsedOnAI) {
weaponBuilder currentWeaponBuilder = newWeaponCreated.GetComponent<weaponBuilder> ();
if (currentWeaponBuilder != null) {
currentWeaponBuilder.checkWeaponsPartsToRemoveOnAI ();
}
IKWeaponSystem currentIKWeaponSystem = newWeaponCreated.GetComponent<IKWeaponSystem> ();
if (currentIKWeaponSystem != null) {
currentIKWeaponSystem.setWeaponEnabledState (true);
currentIKWeaponSystem.setUseLowerRotationSpeedAimed (false);
currentIKWeaponSystem.setUseLowerRotationSpeedAimedThirdPerson (false);
GameObject weaponMesh = currentIKWeaponSystem.getWeaponSystemManager ().weaponSettings.weaponMesh;
if (weaponMesh != null) {
currentPlayerWeaponsManager.setWeaponPartLayerFromCameraView (weaponMesh, false);
}
}
}
Debug.Log ("Weapon " + newWeaponName + " added to character");
currentPlayerWeaponsManager.setWeaponList ();
} else {
Debug.Log ("WARNING: no prefab found on path " + prefabsPath + newWeaponName);
}
}
void Update ()
{
if (weaponAdded) {
if (timer < timeToBuild) {
timer += 0.01f;
if (timer > timeToBuild) {
timer = 0;
if (closeWindowAfterAddingObjectToCharacter) {
this.Close ();
} else {
OnEnable ();
}
}
}
}
}
}
#endif

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: e5c6662969897c549994eab363541daa
timeCreated: 1592675590
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/addWeaponToCharacterEditor.cs
uploadId: 814740

View File

@@ -0,0 +1,793 @@
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using System.IO;
using UnityEngine.EventSystems;
#if UNITY_EDITOR
using UnityEditor;
public class armorClothSystemCreatorEditor : EditorWindow
{
GUISkin guiSkin;
Rect windowRect = new Rect ();
Event currentEvent;
Vector2 rectSize = new Vector2 (500, 600);
float minHeight = 600f;
bool setCreated;
float timeToBuild = 0.2f;
float timer;
string armorClothPrefabPath = "";
string fullSetsCharacterCreationTemplatesPrefabPath = "";
string armorClothMeshInventoryPrefabsPath = "";
public string fullArmorClothName;
public List<armorClothSetPieceInfo> armorClothSetPieceInfoList = new List<armorClothSetPieceInfo> ();
public armorClothPieceTemplateData mainArmorClothPieceTemplateData;
public fullArmorClothTemplateData mainFullArmorClothTemplateData;
public characterAspectCustomizationTemplateData mainCharacterAspectCustomizationTemplateData;
public bool useCharacterCustomizationManagerInfo;
public characterCustomizationManager currentCharacterCustomizationManager;
public GameObject currentCharacterCustomizationManagerGameObject;
GUIStyle style = new GUIStyle ();
GUIStyle labelStyle = new GUIStyle ();
float windowHeightPercentage = 0.6f;
Vector2 screenResolution;
Vector2 scrollPos1;
float maxLayoutWidht = 220;
armorClothSetPieceInfo currentArmorClothSetPieceInfo;
armorClothStatsInfo currentArmorClothStatsInfo;
Vector2 previousRectSize;
[MenuItem ("Game Kit Controller/Create Armor-Cloth Set", false, 27)]
public static void createArmorClothSystem ()
{
GetWindow<armorClothSystemCreatorEditor> ();
}
void OnEnable ()
{
screenResolution = new Vector2 (Screen.currentResolution.width, Screen.currentResolution.height);
// Debug.Log (screenResolution + " " + partsHeight + " " + settingsHeight + " " + previewHeight);
float totalHeight = screenResolution.y * windowHeightPercentage;
totalHeight = Mathf.Clamp (totalHeight, minHeight, screenResolution.y);
rectSize = new Vector2 (660, totalHeight);
armorClothPrefabPath = pathInfoValues.getArmorClothPrefabPath ();
fullSetsCharacterCreationTemplatesPrefabPath = pathInfoValues.getFullSetsCharacterCreationTemplatesPrefabPath ();
armorClothMeshInventoryPrefabsPath = pathInfoValues.getArmorClothMeshInventoryPrefabsPath ();
resetCreatorValues ();
}
void OnDisable ()
{
resetCreatorValues ();
}
void resetCreatorValues ()
{
if (setCreated) {
} else {
}
Debug.Log ("Set Creator window closed");
}
void OnGUI ()
{
if (!guiSkin) {
guiSkin = Resources.Load ("GUI") as GUISkin;
}
GUI.skin = guiSkin;
this.minSize = rectSize;
this.titleContent = new GUIContent ("Armor Cloth System", null, "Create New Armor Cloth Set");
GUILayout.BeginVertical ("Create New Armor Cloth Set", "window");
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
windowRect = GUILayoutUtility.GetLastRect ();
// windowRect.position = new Vector2 (0, windowRect.position.y);
windowRect.width = this.maxSize.x;
GUILayout.BeginHorizontal ();
EditorGUILayout.HelpBox ("", MessageType.Info);
style = new GUIStyle (EditorStyles.helpBox);
style.richText = true;
style.fontStyle = FontStyle.Bold;
style.fontSize = 17;
EditorGUILayout.LabelField ("Configure the info of a new armor/cloth set, for each one of its pieces", style);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Window Height", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
if (previousRectSize != rectSize) {
previousRectSize = rectSize;
this.maxSize = rectSize;
}
rectSize.y = EditorGUILayout.Slider (rectSize.y, minHeight, screenResolution.y, GUILayout.ExpandWidth (true));
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
labelStyle.fontStyle = FontStyle.Bold;
EditorGUILayout.LabelField ("ARMOR CLOTH SET INFO", labelStyle);
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Full Armor Cloth Set Name", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
fullArmorClothName = (string)EditorGUILayout.TextField ("", fullArmorClothName);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
scrollPos1 = EditorGUILayout.BeginScrollView (scrollPos1, false, false);
EditorGUILayout.Space ();
GUILayout.Label ("Number of Pieces " + (armorClothSetPieceInfoList.Count).ToString (), EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
EditorGUILayout.Space ();
for (int i = 0; i < armorClothSetPieceInfoList.Count; i++) {
currentArmorClothSetPieceInfo = armorClothSetPieceInfoList [i];
GUILayout.BeginHorizontal ("box");
GUILayout.BeginVertical ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Piece Name", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentArmorClothSetPieceInfo.Name = (string)EditorGUILayout.TextField ("", currentArmorClothSetPieceInfo.Name);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Category Name", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentArmorClothSetPieceInfo.categoryName = (string)EditorGUILayout.TextField ("", currentArmorClothSetPieceInfo.categoryName);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Piece Icon", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentArmorClothSetPieceInfo.pieceIcon = EditorGUILayout.ObjectField (currentArmorClothSetPieceInfo.pieceIcon, typeof(Texture), true, GUILayout.ExpandWidth (true)) as Texture;
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Piece Description", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentArmorClothSetPieceInfo.pieceDescription = (string)EditorGUILayout.TextField ("", currentArmorClothSetPieceInfo.pieceDescription);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Piece Mesh Prefab", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentArmorClothSetPieceInfo.pieceMeshPrefab = EditorGUILayout.ObjectField (currentArmorClothSetPieceInfo.pieceMeshPrefab, typeof(GameObject), true, GUILayout.ExpandWidth (true)) as GameObject;
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Configure Stats", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentArmorClothSetPieceInfo.configureArmorClothStatsInfo = EditorGUILayout.Toggle ("", currentArmorClothSetPieceInfo.configureArmorClothStatsInfo);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.EndVertical ();
GUILayout.BeginVertical ();
if (GUILayout.Button ("X")) {
armorClothSetPieceInfoList.RemoveAt (i);
}
if (GUILayout.Button ("*")) {
if (armorClothSetPieceInfoList.Count > 0) {
armorClothSetPieceInfoList.Add (new armorClothSetPieceInfo (armorClothSetPieceInfoList [i]));
}
}
GUILayout.EndVertical ();
GUILayout.EndHorizontal ();
if (currentArmorClothSetPieceInfo.configureArmorClothStatsInfo) {
GUILayout.BeginVertical ("box");
GUILayout.Label ("Armor Piece Values for " + currentArmorClothSetPieceInfo.Name, EditorStyles.boldLabel);
EditorGUILayout.Space ();
for (int j = 0; j < currentArmorClothSetPieceInfo.armorClothStatsInfoList.Count; j++) {
GUILayout.Label ("Main Settings", EditorStyles.boldLabel);
currentArmorClothStatsInfo = currentArmorClothSetPieceInfo.armorClothStatsInfoList [j];
GUILayout.BeginHorizontal ();
GUILayout.Label ("Name", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentArmorClothStatsInfo.Name = (string)EditorGUILayout.TextField ("", currentArmorClothStatsInfo.Name);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.Label ("Stats", EditorStyles.boldLabel);
GUILayout.BeginHorizontal ();
GUILayout.Label ("Stat is Amount", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentArmorClothStatsInfo.statIsAmount = EditorGUILayout.Toggle ("", currentArmorClothStatsInfo.statIsAmount);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (currentArmorClothStatsInfo.statIsAmount) {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Stat Amount", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentArmorClothStatsInfo.statAmount = (float)EditorGUILayout.FloatField (currentArmorClothStatsInfo.statAmount);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Use Stat Multiplier", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentArmorClothStatsInfo.useStatMultiplier = EditorGUILayout.Toggle ("", currentArmorClothStatsInfo.useStatMultiplier);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Use Random Range", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentArmorClothStatsInfo.useRandomRange = EditorGUILayout.Toggle ("", currentArmorClothStatsInfo.useRandomRange);
GUILayout.EndHorizontal ();
if (currentArmorClothStatsInfo.useRandomRange) {
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Random Range", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentArmorClothStatsInfo.randomRange = (Vector2)EditorGUILayout.Vector2Field ("", currentArmorClothStatsInfo.randomRange);
GUILayout.EndHorizontal ();
}
} else {
GUILayout.BeginHorizontal ();
GUILayout.Label ("Bool State", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentArmorClothStatsInfo.newBoolState = EditorGUILayout.Toggle ("", currentArmorClothStatsInfo.newBoolState);
GUILayout.EndHorizontal ();
}
EditorGUILayout.Space ();
GUILayout.Label ("Abilities and Skills", EditorStyles.boldLabel);
GUILayout.BeginHorizontal ();
GUILayout.Label ("Activate Ability", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentArmorClothStatsInfo.activateAbility = EditorGUILayout.Toggle ("", currentArmorClothStatsInfo.activateAbility);
GUILayout.EndHorizontal ();
if (currentArmorClothStatsInfo.activateAbility) {
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Ability Name", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentArmorClothStatsInfo.abilityToActivateName = (string)EditorGUILayout.TextField ("", currentArmorClothStatsInfo.abilityToActivateName);
GUILayout.EndHorizontal ();
}
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Unlock Skill", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentArmorClothStatsInfo.unlockSkill = EditorGUILayout.Toggle ("", currentArmorClothStatsInfo.unlockSkill);
GUILayout.EndHorizontal ();
if (currentArmorClothStatsInfo.unlockSkill) {
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Skill Name", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentArmorClothStatsInfo.skillNameToUnlock = (string)EditorGUILayout.TextField ("", currentArmorClothStatsInfo.skillNameToUnlock);
GUILayout.EndHorizontal ();
}
EditorGUILayout.Space ();
GUILayout.Label ("Damage Resistance/Weakness Types", EditorStyles.boldLabel);
GUILayout.BeginHorizontal ();
GUILayout.Label ("Set Damage Type State", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentArmorClothStatsInfo.setDamageTypeState = EditorGUILayout.Toggle ("", currentArmorClothStatsInfo.setDamageTypeState);
GUILayout.EndHorizontal ();
if (currentArmorClothStatsInfo.setDamageTypeState) {
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Damage Type Name", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentArmorClothStatsInfo.damageTypeName = (string)EditorGUILayout.TextField ("", currentArmorClothStatsInfo.damageTypeName);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Damage Type State", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentArmorClothStatsInfo.damageTypeState = EditorGUILayout.Toggle ("", currentArmorClothStatsInfo.damageTypeState);
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Increase Damage Type", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentArmorClothStatsInfo.increaseDamageType = EditorGUILayout.Toggle ("", currentArmorClothStatsInfo.increaseDamageType);
GUILayout.EndHorizontal ();
if (currentArmorClothStatsInfo.increaseDamageType) {
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Extra Damage Name", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentArmorClothStatsInfo.extraDamageType = (float)EditorGUILayout.FloatField (currentArmorClothStatsInfo.extraDamageType);
GUILayout.EndHorizontal ();
}
GUILayout.BeginHorizontal ();
GUILayout.Label ("Set Obtain Health On Damage Type", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentArmorClothStatsInfo.setObtainHealthOnDamageType = EditorGUILayout.Toggle ("", currentArmorClothStatsInfo.setObtainHealthOnDamageType);
GUILayout.EndHorizontal ();
if (currentArmorClothStatsInfo.setObtainHealthOnDamageType) {
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Obtain Health On Damage Type", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentArmorClothStatsInfo.obtainHealthOnDamageType = EditorGUILayout.Toggle ("", currentArmorClothStatsInfo.obtainHealthOnDamageType);
GUILayout.EndHorizontal ();
}
}
EditorGUILayout.Space ();
}
GUILayout.EndVertical ();
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("Clear Values")) {
currentArmorClothSetPieceInfo.armorClothStatsInfoList.Clear ();
}
if (GUILayout.Button ("Add New Value")) {
armorClothStatsInfo newArmorClothStatsInfo = new armorClothStatsInfo ();
currentArmorClothSetPieceInfo.armorClothStatsInfoList.Add (newArmorClothStatsInfo);
}
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
}
EditorGUILayout.Space ();
EditorGUILayout.Space ();
}
EditorGUILayout.EndScrollView ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("Clear Pieces")) {
armorClothSetPieceInfoList.Clear ();
}
if (GUILayout.Button ("Add New Piece")) {
armorClothSetPieceInfo newArmorClothSetPieceInfo = new armorClothSetPieceInfo ();
newArmorClothSetPieceInfo.pieceDescription = "New description";
armorClothSetPieceInfoList.Add (newArmorClothSetPieceInfo);
}
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Get Info From Character Object", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
useCharacterCustomizationManagerInfo = EditorGUILayout.Toggle ("", useCharacterCustomizationManagerInfo);
GUILayout.EndHorizontal ();
if (useCharacterCustomizationManagerInfo) {
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Character Object", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
currentCharacterCustomizationManagerGameObject = EditorGUILayout.ObjectField (currentCharacterCustomizationManagerGameObject, typeof(GameObject), true, GUILayout.ExpandWidth (true)) as GameObject;
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (currentCharacterCustomizationManagerGameObject != null) {
if (GUILayout.Button ("Set Pieces List From Character")) {
armorClothSetPieceInfoList.Clear ();
currentCharacterCustomizationManager = currentCharacterCustomizationManagerGameObject.GetComponentInChildren<characterCustomizationManager> ();
if (currentCharacterCustomizationManager != null) {
for (int i = 0; i < currentCharacterCustomizationManager.characterObjectTypeInfoList.Count; i++) {
if (currentCharacterCustomizationManager.characterObjectTypeInfoList [i].Name.Equals (fullArmorClothName)) {
for (int j = 0; j < currentCharacterCustomizationManager.characterObjectTypeInfoList [i].characterObjectInfoList.Count; j++) {
armorClothSetPieceInfo newArmorClothSetPieceInfo = new armorClothSetPieceInfo ();
newArmorClothSetPieceInfo.Name = currentCharacterCustomizationManager.characterObjectTypeInfoList [i].characterObjectInfoList [j].Name;
newArmorClothSetPieceInfo.categoryName = currentCharacterCustomizationManager.characterObjectTypeInfoList [i].characterObjectInfoList [j].typeName;
newArmorClothSetPieceInfo.pieceDescription = "New description";
armorClothSetPieceInfoList.Add (newArmorClothSetPieceInfo);
}
}
}
} else {
Debug.Log ("WARNING: no character customization manager component located, make sure to assign the object of your\n" +
"new model with the character customization configured and sets info configured on it ");
}
}
}
}
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Armor Cloth Piece Template Data", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
mainArmorClothPieceTemplateData = EditorGUILayout.ObjectField (mainArmorClothPieceTemplateData,
typeof(armorClothPieceTemplateData), true, GUILayout.ExpandWidth (true)) as armorClothPieceTemplateData;
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Full Armor Cloth Piece Template Data", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
mainFullArmorClothTemplateData = EditorGUILayout.ObjectField (mainFullArmorClothTemplateData,
typeof(fullArmorClothTemplateData), true, GUILayout.ExpandWidth (true)) as fullArmorClothTemplateData;
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.Label ("Character Aspect Customization Template Data", EditorStyles.boldLabel, GUILayout.MaxWidth (maxLayoutWidht));
mainCharacterAspectCustomizationTemplateData = EditorGUILayout.ObjectField (mainCharacterAspectCustomizationTemplateData,
typeof(characterAspectCustomizationTemplateData), true, GUILayout.ExpandWidth (true)) as characterAspectCustomizationTemplateData;
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Create New Set")) {
createNewSet ();
}
if (GUILayout.Button ("Cancel")) {
this.Close ();
}
GUILayout.EndVertical ();
}
void createNewSet ()
{
bool checkInfoResult = true;
if (fullArmorClothName == "" || armorClothSetPieceInfoList.Count == 0) {
checkInfoResult = false;
}
for (int i = 0; i < armorClothSetPieceInfoList.Count; i++) {
if (armorClothSetPieceInfoList [i].Name == "") {
Debug.Log ("There is an empty name");
checkInfoResult = false;
}
if (armorClothSetPieceInfoList [i].categoryName == "") {
Debug.Log ("There is an empty category");
checkInfoResult = false;
}
if (armorClothSetPieceInfoList [i].pieceMeshPrefab == null) {
Debug.Log ("There is an empty piece mesh");
checkInfoResult = false;
}
if (armorClothSetPieceInfoList [i].pieceIcon == null) {
Debug.Log ("There is an empty piece icon");
checkInfoResult = false;
}
}
if (mainArmorClothPieceTemplateData == null) {
Debug.Log ("There is an empty piece template");
checkInfoResult = false;
}
if (mainFullArmorClothTemplateData == null) {
Debug.Log ("There is an empty full armor template");
checkInfoResult = false;
}
if (mainCharacterAspectCustomizationTemplateData == null) {
Debug.Log ("There is an empty character aspect customization template");
checkInfoResult = false;
}
if (checkInfoResult) {
List<string> fullArmorPiecesList = new List<string> ();
for (int i = 0; i < armorClothSetPieceInfoList.Count; i++) {
string pieceName = armorClothSetPieceInfoList [i].Name;
GKC_Utils.createInventoryArmorClothPiece (pieceName,
"Armor Cloth Pieces",
armorClothSetPieceInfoList [i].categoryName,
armorClothSetPieceInfoList [i].pieceMeshPrefab,
armorClothSetPieceInfoList [i].pieceDescription,
armorClothSetPieceInfoList [i].pieceIcon,
armorClothMeshInventoryPrefabsPath);
fullArmorPiecesList.Add (pieceName);
armorClothPieceTemplate newArmorClothPieceTemplate = ScriptableObject.CreateInstance<armorClothPieceTemplate> ();
newArmorClothPieceTemplate.Name = pieceName;
newArmorClothPieceTemplate.fullSetName = fullArmorClothName;
if (armorClothSetPieceInfoList [i].configureArmorClothStatsInfo) {
newArmorClothPieceTemplate.armorClothStatsInfoList = armorClothSetPieceInfoList [i].armorClothStatsInfoList;
}
string pathNewArmorClothPieceTemplate = armorClothPrefabPath + pieceName + ".asset";
AssetDatabase.CreateAsset (newArmorClothPieceTemplate, pathNewArmorClothPieceTemplate);
AssetDatabase.SaveAssets ();
AssetDatabase.Refresh ();
EditorUtility.FocusProjectWindow ();
//update scriptable objects info for pieces and full armor
armorClothPieceTemplate currentArmorClothPieceTemplate = (armorClothPieceTemplate)AssetDatabase.LoadAssetAtPath (pathNewArmorClothPieceTemplate, typeof(armorClothPieceTemplate));
if (currentArmorClothPieceTemplate != null) {
mainArmorClothPieceTemplateData.armorClothPieceTemplateList.Add (currentArmorClothPieceTemplate);
EditorUtility.SetDirty (mainArmorClothPieceTemplateData);
}
AssetDatabase.SaveAssets ();
AssetDatabase.Refresh ();
}
fullArmorClothTemplate newFullArmorClothTemplate = ScriptableObject.CreateInstance<fullArmorClothTemplate> ();
newFullArmorClothTemplate.Name = fullArmorClothName;
newFullArmorClothTemplate.fullArmorPiecesList.AddRange (fullArmorPiecesList);
string pathNewFullArmorClothTemplate = armorClothPrefabPath + fullArmorClothName + ".asset";
AssetDatabase.CreateAsset (newFullArmorClothTemplate, pathNewFullArmorClothTemplate);
AssetDatabase.SaveAssets ();
AssetDatabase.Refresh ();
EditorUtility.FocusProjectWindow ();
characterAspectCustomizationTemplate newCharacterAspectCustomizationTemplate = ScriptableObject.CreateInstance<characterAspectCustomizationTemplate> ();
newCharacterAspectCustomizationTemplate.Name = fullArmorClothName;
characterCustomizationInfo newCharacterCustomizationInfo = new characterCustomizationInfo ();
newCharacterCustomizationInfo.Name = fullArmorClothName;
newCharacterCustomizationInfo.typeName = "Object";
newCharacterCustomizationInfo.categoryName = "Full Body";
newCharacterCustomizationInfo.boolValue = true;
newCharacterCustomizationInfo.multipleElements = true;
characterCustomizationTypeInfo newCharacterCustomizationTypeInfo = new characterCustomizationTypeInfo ();
newCharacterCustomizationTypeInfo.Name = "Costume";
newCharacterCustomizationTypeInfo.characterCustomizationInfoList.Add (newCharacterCustomizationInfo);
newCharacterAspectCustomizationTemplate.characterCustomizationTypeInfoList.Add (newCharacterCustomizationTypeInfo);
string pathNewCharacterAspectCustomizationTemplate = fullSetsCharacterCreationTemplatesPrefabPath + fullArmorClothName + ".asset";
AssetDatabase.CreateAsset (newCharacterAspectCustomizationTemplate, pathNewCharacterAspectCustomizationTemplate);
AssetDatabase.SaveAssets ();
AssetDatabase.Refresh ();
EditorUtility.FocusProjectWindow ();
//updating the main character aspect customization template scriptable object
characterAspectCustomizationTemplate currentCharacterAspectCustomizationTemplate =
(characterAspectCustomizationTemplate)AssetDatabase.LoadAssetAtPath (pathNewCharacterAspectCustomizationTemplate, typeof(characterAspectCustomizationTemplate));
if (currentCharacterAspectCustomizationTemplate != null) {
mainCharacterAspectCustomizationTemplateData.characterAspectCustomizationTemplateList.Add (currentCharacterAspectCustomizationTemplate);
EditorUtility.SetDirty (mainCharacterAspectCustomizationTemplateData);
}
//update scriptable objects info for pieces and full armor
fullArmorClothTemplate currentFullArmorClothTemplate = (fullArmorClothTemplate)AssetDatabase.LoadAssetAtPath (pathNewFullArmorClothTemplate, typeof(fullArmorClothTemplate));
if (currentFullArmorClothTemplate != null) {
mainFullArmorClothTemplateData.fullArmorClothTemplateList.Add (currentFullArmorClothTemplate);
EditorUtility.SetDirty (mainFullArmorClothTemplateData);
}
AssetDatabase.SaveAssets ();
AssetDatabase.Refresh ();
Transform[] objectsOnScene = FindObjectsOfType<Transform> ();
if (objectsOnScene.Length > 0) {
GKC_Utils.updateDirtyScene ("Update Scene", objectsOnScene [0].gameObject);
} else {
GKC_Utils.updateDirtyScene ();
}
setCreated = true;
armorClothSetPieceInfoList.Clear ();
} else {
Debug.Log ("WARNING: Make sure to set a full set name and create at least one piece for the set.");
}
}
void Update ()
{
if (setCreated) {
if (timer < timeToBuild) {
timer += 0.01f;
if (timer > timeToBuild) {
timer = 0;
this.Close ();
}
}
}
}
[System.Serializable]
public class armorClothSetPieceInfo
{
public string Name;
public string categoryName;
public Texture pieceIcon;
public string pieceDescription;
public GameObject pieceMeshPrefab;
public bool configureArmorClothStatsInfo;
public List<armorClothStatsInfo> armorClothStatsInfoList = new List<armorClothStatsInfo> ();
public armorClothSetPieceInfo ()
{
}
public armorClothSetPieceInfo (armorClothSetPieceInfo newInfo)
{
Name = newInfo.Name;
categoryName = newInfo.categoryName;
pieceIcon = newInfo.pieceIcon;
pieceDescription = newInfo.pieceDescription;
pieceMeshPrefab = newInfo.pieceMeshPrefab;
configureArmorClothStatsInfo = newInfo.configureArmorClothStatsInfo;
armorClothStatsInfoList = newInfo.armorClothStatsInfoList;
}
}
}
#endif

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 174307cd1a7cb85458db6db200300092
timeCreated: 1659923073
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/armorClothSystemCreatorEditor.cs
uploadId: 814740

View File

@@ -0,0 +1,130 @@
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using System.IO;
using UnityEngine.EventSystems;
#if UNITY_EDITOR
using UnityEditor;
public class assetVersionWindow : EditorWindow
{
GUISkin guiSkin;
Texture2D GKCLogo = null;
Vector2 rect = new Vector2 (450, 640);
GUIStyle style = new GUIStyle ();
GUIStyle buttonStyle = new GUIStyle ();
void OnEnable ()
{
GKCLogo = (Texture2D)Resources.Load ("Logo_reworked", typeof(Texture2D));
}
[MenuItem ("Game Kit Controller/About GKC", false, 602)]
public static void AboutGKC ()
{
GetWindow<assetVersionWindow> ();
}
void OnGUI ()
{
this.titleContent = new GUIContent ("About GKC");
this.minSize = rect;
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
GUILayout.FlexibleSpace ();
GUILayout.Label (GKCLogo, GUILayout.MaxHeight (170));
GUILayout.FlexibleSpace ();
GUILayout.EndHorizontal ();
if (!guiSkin) {
guiSkin = Resources.Load ("GUI") as GUISkin;
}
GUI.skin = guiSkin;
GUILayout.BeginVertical ("window");
GUILayout.BeginVertical ("box");
GUILayout.FlexibleSpace ();
style.normal.textColor = Color.white;
style.fontStyle = FontStyle.Bold;
style.fontSize = 20;
style.alignment = TextAnchor.MiddleCenter;
GUILayout.Label ("Game Kit Controller\n", style);
style.fontSize = 15;
GUILayout.Label ("Version: 3.77g", style);
GUILayout.FlexibleSpace ();
GUILayout.EndVertical ();
EditorGUILayout.Space ();
buttonStyle = new GUIStyle (GUI.skin.button);
buttonStyle.fontStyle = FontStyle.Bold;
buttonStyle.fontSize = 14;
if (GUILayout.Button ("Online Gitbook Docs", buttonStyle)) {
Application.OpenURL ("https://game-kit-controller.gitbook.io/docs/");
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Open Tutorial Videos", buttonStyle)) {
Application.OpenURL ("https://youtu.be/lZB_5b4tUm0?list=PLYVCbGEtbhxVjZ9C41fwTDynTpVkCP9iA");
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Go to the Forum", buttonStyle)) {
Application.OpenURL ("https://discussions.unity.com/t/released-game-kit-controller-engine-with-melee-weapons-vehicles-crafting-more-3-76/595741");
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Join Discord", buttonStyle)) {
Application.OpenURL ("https://discord.gg/kUpeRZ8https://discord.gg/kUpeRZ8");
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Public Repository", buttonStyle)) {
Application.OpenURL ("https://github.com/sr3888/GKC-Public-Repository");
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Review Asset", buttonStyle)) {
Application.OpenURL ("https://assetstore.unity.com/packages/templates/systems/game-kit-controller-40995#reviews");
}
EditorGUILayout.Space ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Close", buttonStyle)) {
this.Close ();
}
EditorGUILayout.Space ();
EditorGUILayout.HelpBox ("IMPORTANT: If you update your GKC version, you can delete the previous GKC folder " +
"or overwrite it. Make sure you have a backup of your project before.", MessageType.Info);
GUILayout.EndVertical ();
}
}
#endif

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 7c6166681b517234da00e58c8a66eb53
timeCreated: 1560919906
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/assetVersionWindow.cs
uploadId: 814740

View File

@@ -0,0 +1,80 @@
using UnityEngine;
using System.Collections;
#if UNITY_EDITOR
using UnityEditor;
[CustomEditor (typeof(bodyMountPointsSystem))]
public class bodyMountPointsSystemEditor : Editor
{
bodyMountPointsSystem manager;
Vector3 curretPositionHandle;
Quaternion currentRotationHandle;
void OnEnable ()
{
manager = (bodyMountPointsSystem)target;
}
void OnSceneGUI ()
{
if (manager.showGizmo && manager.editingMountPoint) {
if (!Application.isPlaying) {
if (manager.temporalMountPointTransform != null) {
showPositionHandle (manager.temporalMountPointTransform.transform, "Edit Temporal Mount Point Transform");
}
}
}
}
public override void OnInspectorGUI ()
{
DrawDefaultInspector ();
EditorGUILayout.Space ();
GUILayout.Label ("EDITOR BUTTONS", EditorStyles.boldLabel);
EditorGUILayout.Space ();
if (GUILayout.Button ("Toggle Edit Mount Point")) {
manager.toggleEditMountPoint ();
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Show/Hide Handle Gizmo")) {
manager.toggleShowHandleGizmo ();
}
EditorGUILayout.Space ();
}
public void showPositionHandle (Transform currentTransform, string handleName)
{
currentRotationHandle = Tools.pivotRotation == PivotRotation.Local ? currentTransform.rotation : Quaternion.identity;
EditorGUI.BeginChangeCheck ();
curretPositionHandle = currentTransform.position;
if (Tools.current == Tool.Move) {
curretPositionHandle = Handles.DoPositionHandle (curretPositionHandle, currentRotationHandle);
}
currentRotationHandle = currentTransform.rotation;
if (Tools.current == Tool.Rotate) {
currentRotationHandle = Handles.DoRotationHandle (currentRotationHandle, curretPositionHandle);
}
if (EditorGUI.EndChangeCheck ()) {
Undo.RecordObject (currentTransform, handleName);
currentTransform.position = curretPositionHandle;
currentTransform.rotation = currentRotationHandle;
}
}
}
#endif

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 48813e5c074480442a818ea51318d00a
timeCreated: 1633581857
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/bodyMountPointsSystemEditor.cs
uploadId: 814740

View File

@@ -0,0 +1,931 @@
using UnityEngine;
using System.Collections;
#if UNITY_EDITOR
using UnityEditor;
[CanEditMultipleObjects]
[CustomEditor (typeof (buildPlayer))]
public class buildPlayerEditor : Editor
{
SerializedProperty placeNewCharacterOnSceneCenterEnabled;
SerializedProperty player;
SerializedProperty grabPhysicalObject;
SerializedProperty currentCharacterModel;
SerializedProperty layerToPlaceNPC;
SerializedProperty buildPlayerType;
SerializedProperty hasWeaponsEnabled;
SerializedProperty assignNewModelManually;
SerializedProperty setNewSpineAndChestBonesManually;
SerializedProperty explanation;
SerializedProperty newCharacterModel;
SerializedProperty head;
SerializedProperty neck;
SerializedProperty chest;
SerializedProperty spine;
SerializedProperty rightLowerArm;
SerializedProperty leftLowerArm;
SerializedProperty rightHand;
SerializedProperty leftHand;
SerializedProperty rightLowerLeg;
SerializedProperty leftLowerLeg;
SerializedProperty rightFoot;
SerializedProperty leftFoot;
SerializedProperty rightToes;
SerializedProperty leftToes;
SerializedProperty settingsInfoCategoryList;
SerializedProperty temporalSettingsInfoList;
SerializedProperty newCharacterSettingsTemplate;
SerializedProperty characterTemplateDataPath;
SerializedProperty characterTemplateName;
SerializedProperty characterTemplateID;
SerializedProperty characterSettingsTemplateInfoList;
SerializedProperty applyCharacterSettingsOnManualBuild;
SerializedProperty eventOnCreatePlayer;
SerializedProperty eventToSendNewPlayerModel;
SerializedProperty objectSearcherName;
SerializedProperty searchObjectsActive;
SerializedProperty clearOldWeakSpotListOnCreateNewCharacterEnabled;
SerializedProperty mainChestMountPointName;
buildPlayer manager;
bool expanded;
bool showTemporalSettingList;
string fieldName;
bool showElements;
GUIStyle style = new GUIStyle ();
Color buttonColor;
string currentButtonString;
GUIStyle buttonStyle = new GUIStyle ();
void OnEnable ()
{
placeNewCharacterOnSceneCenterEnabled = serializedObject.FindProperty ("placeNewCharacterOnSceneCenterEnabled");
player = serializedObject.FindProperty ("player");
grabPhysicalObject = serializedObject.FindProperty ("grabPhysicalObject");
currentCharacterModel = serializedObject.FindProperty ("currentCharacterModel");
layerToPlaceNPC = serializedObject.FindProperty ("layerToPlaceNPC");
buildPlayerType = serializedObject.FindProperty ("buildPlayerType");
hasWeaponsEnabled = serializedObject.FindProperty ("hasWeaponsEnabled");
assignNewModelManually = serializedObject.FindProperty ("assignNewModelManually");
setNewSpineAndChestBonesManually = serializedObject.FindProperty ("setNewSpineAndChestBonesManually");
explanation = serializedObject.FindProperty ("explanation");
newCharacterModel = serializedObject.FindProperty ("newCharacterModel");
head = serializedObject.FindProperty ("head");
neck = serializedObject.FindProperty ("neck");
chest = serializedObject.FindProperty ("chest");
spine = serializedObject.FindProperty ("spine");
rightLowerArm = serializedObject.FindProperty ("rightLowerArm");
leftLowerArm = serializedObject.FindProperty ("leftLowerArm");
rightHand = serializedObject.FindProperty ("rightHand");
leftHand = serializedObject.FindProperty ("leftHand");
rightLowerLeg = serializedObject.FindProperty ("rightLowerLeg");
leftLowerLeg = serializedObject.FindProperty ("leftLowerLeg");
rightFoot = serializedObject.FindProperty ("rightFoot");
leftFoot = serializedObject.FindProperty ("leftFoot");
rightToes = serializedObject.FindProperty ("rightToes");
leftToes = serializedObject.FindProperty ("leftToes");
settingsInfoCategoryList = serializedObject.FindProperty ("settingsInfoCategoryList");
temporalSettingsInfoList = serializedObject.FindProperty ("temporalSettingsInfoList");
newCharacterSettingsTemplate = serializedObject.FindProperty ("newCharacterSettingsTemplate");
characterTemplateDataPath = serializedObject.FindProperty ("characterTemplateDataPath");
characterTemplateName = serializedObject.FindProperty ("characterTemplateName");
characterTemplateID = serializedObject.FindProperty ("characterTemplateID");
characterSettingsTemplateInfoList = serializedObject.FindProperty ("characterSettingsTemplateInfoList");
applyCharacterSettingsOnManualBuild = serializedObject.FindProperty ("applyCharacterSettingsOnManualBuild");
eventOnCreatePlayer = serializedObject.FindProperty ("eventOnCreatePlayer");
eventToSendNewPlayerModel = serializedObject.FindProperty ("eventToSendNewPlayerModel");
objectSearcherName = serializedObject.FindProperty ("objectSearcherName");
searchObjectsActive = serializedObject.FindProperty ("searchObjectsActive");
clearOldWeakSpotListOnCreateNewCharacterEnabled = serializedObject.FindProperty ("clearOldWeakSpotListOnCreateNewCharacterEnabled");
mainChestMountPointName = serializedObject.FindProperty ("mainChestMountPointName");
manager = (buildPlayer)target;
}
public override void OnInspectorGUI ()
{
style.fontStyle = FontStyle.Bold;
style.fontSize = 25;
style.alignment = TextAnchor.MiddleCenter;
GUILayout.BeginVertical ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.LabelField ("MAIN SETTINGS", style);
EditorGUILayout.Space ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Place New Character Settings", "window");
EditorGUILayout.PropertyField (placeNewCharacterOnSceneCenterEnabled);
EditorGUILayout.PropertyField (layerToPlaceNPC);
EditorGUILayout.PropertyField (mainChestMountPointName);
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Build Settings", "window");
EditorGUILayout.PropertyField (buildPlayerType);
EditorGUILayout.PropertyField (hasWeaponsEnabled);
EditorGUILayout.PropertyField (clearOldWeakSpotListOnCreateNewCharacterEnabled);
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Build Player Manually", "window");
EditorGUILayout.PropertyField (assignNewModelManually);
if (assignNewModelManually.boolValue) {
EditorGUILayout.Space ();
EditorGUILayout.PropertyField (explanation);
EditorGUILayout.Space ();
EditorGUILayout.PropertyField (newCharacterModel);
if (newCharacterModel.objectReferenceValue) {
GUILayout.Label ("Top Part");
EditorGUILayout.PropertyField (head);
EditorGUILayout.PropertyField (neck);
EditorGUILayout.PropertyField (chest);
EditorGUILayout.PropertyField (spine);
EditorGUILayout.Space ();
GUILayout.Label ("Middle Part");
EditorGUILayout.PropertyField (rightLowerArm);
EditorGUILayout.PropertyField (leftLowerArm);
EditorGUILayout.PropertyField (rightHand);
EditorGUILayout.PropertyField (leftHand);
EditorGUILayout.Space ();
GUILayout.Label ("Lower Part");
EditorGUILayout.PropertyField (rightLowerLeg);
EditorGUILayout.PropertyField (leftLowerLeg);
EditorGUILayout.PropertyField (rightFoot);
EditorGUILayout.PropertyField (leftFoot);
EditorGUILayout.PropertyField (rightToes);
EditorGUILayout.PropertyField (leftToes);
}
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.PropertyField (applyCharacterSettingsOnManualBuild);
EditorGUILayout.Space ();
if (GUILayout.Button ("Search Bones On New Character")) {
if (!Application.isPlaying) {
manager.getCharacterBones ();
}
}
}
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Update Spine and Chest Bones", "window");
EditorGUILayout.PropertyField (setNewSpineAndChestBonesManually);
if (setNewSpineAndChestBonesManually.boolValue) {
EditorGUILayout.Space ();
EditorGUILayout.PropertyField (chest);
EditorGUILayout.PropertyField (spine);
EditorGUILayout.Space ();
if (GUILayout.Button ("Update Spine and Chest Bones")) {
if (!Application.isPlaying) {
manager.setNewSpineAndChestBones ();
}
}
}
GUILayout.EndVertical ();
EditorGUILayout.Space ();
buttonStyle = new GUIStyle (GUI.skin.button);
buttonStyle.fontStyle = FontStyle.Bold;
buttonStyle.fontSize = 16;
if (GUILayout.Button ("\n BUILD CHARACTER \n", buttonStyle)) {
if (!Application.isPlaying) {
manager.buildCharacterByButton ();
}
}
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.LabelField ("CHARACTER SETTINGS", style);
EditorGUILayout.Space ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Settings List", "window");
showSettingsInfoCategoryList (settingsInfoCategoryList);
EditorGUILayout.Space ();
GUILayout.EndVertical ();
EditorGUILayout.Space ();
buttonColor = GUI.backgroundColor;
if (showTemporalSettingList) {
GUI.backgroundColor = Color.gray;
currentButtonString = "\n Hide Settings List \n";
} else {
GUI.backgroundColor = buttonColor;
currentButtonString = "\n Show Settings List \n";
}
if (GUILayout.Button (currentButtonString, buttonStyle)) {
showTemporalSettingList = !showTemporalSettingList;
}
GUI.backgroundColor = buttonColor;
EditorGUILayout.Space ();
if (showTemporalSettingList) {
EditorGUILayout.Space ();
if (GUILayout.Button ("Update Settings List", buttonStyle)) {
manager.setTemporalSettingsInfoList ();
}
EditorGUILayout.Space ();
if (GUILayout.Button ("Clear Settings List", buttonStyle)) {
manager.clearTemporalSettingsInfoList ();
}
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Settings List", "window");
showTemporalSettingsInfoList (temporalSettingsInfoList);
GUILayout.EndVertical ();
}
EditorGUILayout.Space ();
if (GUILayout.Button ("\n APPLY CURRENT SETTINGS \n", buttonStyle)) {
manager.adjustSettingsFromEditor ();
}
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Settings Searcher", "window");
EditorGUILayout.PropertyField (objectSearcherName, new GUIContent ("Setting To Search"), false);
EditorGUILayout.Space ();
if (GUILayout.Button ("Search Settings By Name")) {
manager.showObjectsBySearchName ();
}
if (searchObjectsActive.boolValue) {
if (GUILayout.Button ("Clear Results")) {
manager.clearObjectsSearcResultList ();
}
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Settings To Search Result List", "window");
showSearchResultTemporalSettingsInfoList (temporalSettingsInfoList);
GUILayout.EndVertical ();
}
GUILayout.EndVertical ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.LabelField ("CHARACTER MANAGEMENT\n SETTINGS", style);
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Save/Load Settings List To File", "window");
EditorGUILayout.PropertyField (newCharacterSettingsTemplate);
EditorGUILayout.Space ();
if (GUILayout.Button ("Save Settings List To File")) {
manager.saveSettingsListToFile ();
}
if (GUILayout.Button ("Load Settings List From File")) {
manager.loadSettingsListFromFile ();
}
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Create New Character Template Data", "window");
EditorGUILayout.PropertyField (characterTemplateID);
EditorGUILayout.PropertyField (characterTemplateDataPath);
EditorGUILayout.PropertyField (characterTemplateName);
EditorGUILayout.Space ();
if (GUILayout.Button ("Create Character Template")) {
manager.createSettingsListTemplate ();
}
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Character Template List", "window");
showCharacterSettingsTemplateInfoList (characterSettingsTemplateInfoList);
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Event Settings", "window");
EditorGUILayout.PropertyField (eventOnCreatePlayer);
EditorGUILayout.Space ();
EditorGUILayout.PropertyField (eventToSendNewPlayerModel);
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Character Elements", "window");
if (GUILayout.Button ("Show Elements")) {
showElements = !showElements;
}
EditorGUILayout.Space ();
if (showElements) {
EditorGUILayout.PropertyField (player);
EditorGUILayout.PropertyField (grabPhysicalObject);
EditorGUILayout.PropertyField (currentCharacterModel);
}
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.EndVertical ();
if (GUI.changed) {
serializedObject.ApplyModifiedProperties ();
}
}
void showSettingsInfoCategoryList (SerializedProperty list)
{
GUILayout.BeginVertical ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Show/Hide Setting Info Category List", buttonStyle)) {
list.isExpanded = !list.isExpanded;
}
EditorGUILayout.Space ();
if (list.isExpanded) {
EditorGUILayout.Space ();
GUILayout.Label ("Number Of Categories: \t" + list.arraySize);
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("Add Category")) {
list.arraySize++;
}
if (GUILayout.Button ("Clear List")) {
list.arraySize = 0;
}
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("Expand All")) {
for (int i = 0; i < list.arraySize; i++) {
list.GetArrayElementAtIndex (i).isExpanded = true;
}
}
if (GUILayout.Button ("Collapse All")) {
for (int i = 0; i < list.arraySize; i++) {
list.GetArrayElementAtIndex (i).isExpanded = false;
}
}
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
for (int i = 0; i < list.arraySize; i++) {
expanded = false;
GUILayout.BeginHorizontal ();
GUILayout.BeginHorizontal ("box");
EditorGUILayout.Space ();
if (i < list.arraySize && i >= 0) {
EditorGUILayout.BeginVertical ();
SerializedProperty currentArrayElement = list.GetArrayElementAtIndex (i);
EditorGUILayout.PropertyField (currentArrayElement, false);
if (currentArrayElement.isExpanded) {
showSettingsInfoCategoryListElement (currentArrayElement);
expanded = true;
}
EditorGUILayout.Space ();
GUILayout.EndVertical ();
}
GUILayout.EndHorizontal ();
if (expanded) {
GUILayout.BeginVertical ();
} else {
GUILayout.BeginHorizontal ();
}
if (GUILayout.Button ("x")) {
list.DeleteArrayElementAtIndex (i);
}
if (GUILayout.Button ("v")) {
if (i >= 0) {
list.MoveArrayElement (i, i + 1);
}
}
if (GUILayout.Button ("^")) {
if (i < list.arraySize) {
list.MoveArrayElement (i, i - 1);
}
}
if (expanded) {
GUILayout.EndVertical ();
} else {
GUILayout.EndHorizontal ();
}
GUILayout.EndHorizontal ();
}
}
GUILayout.EndVertical ();
}
void showSettingsInfoCategoryListElement (SerializedProperty list)
{
GUILayout.BeginVertical ("box");
EditorGUILayout.PropertyField (list.FindPropertyRelative ("Name"));
EditorGUILayout.Space ();
showSettingsInfoList (list.FindPropertyRelative ("settingsInfoList"));
GUILayout.EndVertical ();
}
void showSettingsInfoList (SerializedProperty list)
{
GUILayout.BeginVertical ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Show/Hide Settings Info List", buttonStyle)) {
list.isExpanded = !list.isExpanded;
}
EditorGUILayout.Space ();
if (list.isExpanded) {
EditorGUILayout.Space ();
GUILayout.Label ("Number Of Settings: \t" + list.arraySize);
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("Add Settings")) {
list.arraySize++;
}
if (GUILayout.Button ("Clear List")) {
list.arraySize = 0;
}
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("Expand All")) {
for (int i = 0; i < list.arraySize; i++) {
list.GetArrayElementAtIndex (i).isExpanded = true;
}
}
if (GUILayout.Button ("Collapse All")) {
for (int i = 0; i < list.arraySize; i++) {
list.GetArrayElementAtIndex (i).isExpanded = false;
}
}
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
for (int i = 0; i < list.arraySize; i++) {
expanded = false;
GUILayout.BeginHorizontal ();
GUILayout.BeginHorizontal ("box");
EditorGUILayout.Space ();
if (i < list.arraySize && i >= 0) {
EditorGUILayout.BeginVertical ();
SerializedProperty currentArrayElement = list.GetArrayElementAtIndex (i);
EditorGUILayout.PropertyField (currentArrayElement, false);
if (currentArrayElement.isExpanded) {
showSettingsInfoListElement (currentArrayElement);
expanded = true;
}
EditorGUILayout.Space ();
GUILayout.EndVertical ();
}
GUILayout.EndHorizontal ();
if (expanded) {
GUILayout.BeginVertical ();
} else {
GUILayout.BeginHorizontal ();
}
if (GUILayout.Button ("x")) {
list.DeleteArrayElementAtIndex (i);
}
if (GUILayout.Button ("v")) {
if (i >= 0) {
list.MoveArrayElement (i, i + 1);
}
}
if (GUILayout.Button ("^")) {
if (i < list.arraySize) {
list.MoveArrayElement (i, i - 1);
}
}
if (expanded) {
GUILayout.EndVertical ();
} else {
GUILayout.EndHorizontal ();
}
GUILayout.EndHorizontal ();
}
EditorGUILayout.Space ();
}
GUILayout.EndVertical ();
}
void showSettingsInfoListElement (SerializedProperty list)
{
GUILayout.BeginVertical ("box");
EditorGUILayout.PropertyField (list.FindPropertyRelative ("Name"));
EditorGUILayout.PropertyField (list.FindPropertyRelative ("settingEnabled"));
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Bool Values Settings", "window");
EditorGUILayout.PropertyField (list.FindPropertyRelative ("useBoolState"));
if (list.FindPropertyRelative ("useBoolState").boolValue) {
EditorGUILayout.PropertyField (list.FindPropertyRelative ("boolState"));
EditorGUILayout.PropertyField (list.FindPropertyRelative ("eventToSetBoolState"));
}
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Float Values Settings", "window");
EditorGUILayout.PropertyField (list.FindPropertyRelative ("useFloatValue"));
if (list.FindPropertyRelative ("useFloatValue").boolValue) {
EditorGUILayout.PropertyField (list.FindPropertyRelative ("floatValue"));
EditorGUILayout.PropertyField (list.FindPropertyRelative ("eventToSetFloatValue"));
}
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("String Values Settings", "window");
EditorGUILayout.PropertyField (list.FindPropertyRelative ("useStringValue"));
if (list.FindPropertyRelative ("useStringValue").boolValue) {
EditorGUILayout.PropertyField (list.FindPropertyRelative ("stringValue"));
EditorGUILayout.PropertyField (list.FindPropertyRelative ("eventToSetStringValue"));
}
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Vector3 Values Settings", "window");
EditorGUILayout.PropertyField (list.FindPropertyRelative ("useVector3Value"));
if (list.FindPropertyRelative ("useVector3Value").boolValue) {
EditorGUILayout.PropertyField (list.FindPropertyRelative ("vector3Value"));
EditorGUILayout.PropertyField (list.FindPropertyRelative ("eventToSetVector3Value"));
}
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Regular Values Settings", "window");
EditorGUILayout.PropertyField (list.FindPropertyRelative ("useRegularValue"));
if (list.FindPropertyRelative ("useRegularValue").boolValue) {
EditorGUILayout.PropertyField (list.FindPropertyRelative ("regularValue"));
EditorGUILayout.PropertyField (list.FindPropertyRelative ("eventToEnableActiveValue"));
EditorGUILayout.PropertyField (list.FindPropertyRelative ("eventToDisableActiveValue"));
}
GUILayout.EndVertical ();
EditorGUILayout.Space ();
GUILayout.BeginVertical ("Field Explanation Settings", "window");
EditorGUILayout.PropertyField (list.FindPropertyRelative ("useFieldExplanation"));
if (list.FindPropertyRelative ("useFieldExplanation").boolValue) {
EditorGUILayout.PropertyField (list.FindPropertyRelative ("fieldExplanation"));
}
GUILayout.EndVertical ();
GUILayout.EndVertical ();
}
void showTemporalSettingsInfoList (SerializedProperty list)
{
GUILayout.BeginVertical ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Show/Hide Temporal Settings Info List", buttonStyle)) {
list.isExpanded = !list.isExpanded;
}
EditorGUILayout.Space ();
if (list.isExpanded) {
EditorGUILayout.Space ();
GUILayout.Label ("Number Of Settings: \t" + list.arraySize);
EditorGUILayout.Space ();
for (int i = 0; i < list.arraySize; i++) {
GUILayout.BeginHorizontal ();
GUILayout.BeginHorizontal ("box");
if (i < list.arraySize && i >= 0) {
EditorGUILayout.BeginHorizontal ();
showTemporalSettingsInfoListElement (list.GetArrayElementAtIndex (i), i);
GUILayout.EndHorizontal ();
}
GUILayout.EndHorizontal ();
GUILayout.EndHorizontal ();
}
}
GUILayout.EndVertical ();
}
void showTemporalSettingsInfoListElement (SerializedProperty list, int index)
{
EditorGUILayout.LabelField (list.FindPropertyRelative ("Name").stringValue, GUILayout.MaxWidth (340));
if (list.FindPropertyRelative ("useBoolState").boolValue) {
EditorGUILayout.PropertyField (list.FindPropertyRelative ("boolState"), new GUIContent (""), GUILayout.MaxWidth (150));
}
if (list.FindPropertyRelative ("useFloatValue").boolValue) {
EditorGUILayout.PropertyField (list.FindPropertyRelative ("floatValue"), new GUIContent (""), GUILayout.MaxWidth (150));
}
if (list.FindPropertyRelative ("useStringValue").boolValue) {
EditorGUILayout.PropertyField (list.FindPropertyRelative ("stringValue"), new GUIContent (""), GUILayout.MaxWidth (150));
}
if (list.FindPropertyRelative ("useRegularValue").boolValue) {
EditorGUILayout.PropertyField (list.FindPropertyRelative ("regularValue"), new GUIContent (""), GUILayout.MaxWidth (150));
}
GUILayout.Label ("\t");
if (GUILayout.Button ("Apply", GUILayout.MaxWidth (70))) {
manager.adjustSingleSettingsFromEditor (index);
}
}
void showSearchResultTemporalSettingsInfoList (SerializedProperty list)
{
GUILayout.BeginVertical ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Show/Hide Settings Search Result", buttonStyle)) {
list.isExpanded = !list.isExpanded;
}
EditorGUILayout.Space ();
if (list.isExpanded) {
EditorGUILayout.Space ();
GUILayout.Label ("Number Of Settings: \t" + list.arraySize);
EditorGUILayout.Space ();
for (int i = 0; i < list.arraySize; i++) {
if (manager.objectSearchResultList.Contains (i)) {
GUILayout.BeginHorizontal ();
GUILayout.BeginHorizontal ("box");
if (i < list.arraySize && i >= 0) {
EditorGUILayout.BeginHorizontal ();
showTemporalSettingsInfoListElement (list.GetArrayElementAtIndex (i), i);
GUILayout.EndHorizontal ();
}
GUILayout.EndHorizontal ();
GUILayout.EndHorizontal ();
}
}
}
GUILayout.EndVertical ();
}
void showCharacterSettingsTemplateInfoList (SerializedProperty list)
{
GUILayout.BeginVertical ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Show/Hide Character Settings Template Info List", buttonStyle)) {
list.isExpanded = !list.isExpanded;
}
EditorGUILayout.Space ();
if (list.isExpanded) {
EditorGUILayout.Space ();
GUILayout.Label ("Number Of Templates: \t" + list.arraySize);
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("Add Template")) {
list.arraySize++;
}
if (GUILayout.Button ("Clear List")) {
list.arraySize = 0;
}
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("Expand All")) {
for (int i = 0; i < list.arraySize; i++) {
list.GetArrayElementAtIndex (i).isExpanded = true;
}
}
if (GUILayout.Button ("Collapse All")) {
for (int i = 0; i < list.arraySize; i++) {
list.GetArrayElementAtIndex (i).isExpanded = false;
}
}
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
for (int i = 0; i < list.arraySize; i++) {
GUILayout.BeginHorizontal ();
GUILayout.BeginHorizontal ("box");
if (i < list.arraySize && i >= 0) {
EditorGUILayout.BeginVertical ();
GUILayout.BeginHorizontal ();
showCharacterSettingsTemplateInfoListElement (list.GetArrayElementAtIndex (i));
if (GUILayout.Button ("x")) {
list.DeleteArrayElementAtIndex (i);
}
GUILayout.EndHorizontal ();
EditorGUILayout.Space ();
if (GUILayout.Button ("Set as Current Template To Apply")) {
manager.setTemplateFromListAsCurrentToApply (i);
}
GUILayout.EndVertical ();
}
GUILayout.EndHorizontal ();
GUILayout.EndHorizontal ();
}
}
GUILayout.EndVertical ();
}
void showCharacterSettingsTemplateInfoListElement (SerializedProperty list)
{
GUILayout.BeginVertical ("box");
EditorGUILayout.PropertyField (list.FindPropertyRelative ("Name"));
EditorGUILayout.PropertyField (list.FindPropertyRelative ("template"));
GUILayout.EndVertical ();
}
}
#endif

View File

@@ -0,0 +1,17 @@
fileFormatVersion: 2
guid: 543d8a79488124b438b182075c5cb6d1
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Editor/buildPlayerEditor.cs
uploadId: 814740

View File

@@ -0,0 +1,30 @@
using UnityEngine;
using System.Collections;
#if UNITY_EDITOR
using UnityEditor;
[CustomEditor (typeof(camera2_5dZoneLimitSystem))]
[CanEditMultipleObjects]
public class camera2_5dZoneLimitSystemEditor : Editor
{
public override void OnInspectorGUI ()
{
camera2_5dZoneLimitSystem manager = (camera2_5dZoneLimitSystem)target;
DrawDefaultInspector ();
EditorGUILayout.Space ();
GUILayout.Label ("EDITOR BUTTONS", EditorStyles.boldLabel);
EditorGUILayout.Space ();
if (GUILayout.Button ("Set Current Configuration")) {
manager.setConfigurationToPlayer ();
}
EditorGUILayout.Space ();
}
}
#endif

Some files were not shown because too many files have changed in this diff Show More