Compare commits
49 Commits
550efdfaad
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
76a513b577 | ||
|
|
bec90a20a0 | ||
|
|
fbe588c854 | ||
|
|
4c110f98c0 | ||
|
|
cd0ef3c73a | ||
|
|
691c80343e | ||
|
|
2c283c6623 | ||
|
|
d0a16d1e44 | ||
|
|
e2fa430d50 | ||
| 0cb9be4070 | |||
| 3221488a9e | |||
| 43ea25b9e3 | |||
| b34e135610 | |||
| 24a09dac43 | |||
| cf44edc19a | |||
| 3c5507dd87 | |||
| 9ded503704 | |||
| 8ea4b173a3 | |||
| 3ff9819d78 | |||
|
|
94511923d5 | ||
|
|
2435f0d27f | ||
|
|
352ba8a27b | ||
| 4d3e9da172 | |||
|
|
501312e0c2 | ||
| e55827d9d0 | |||
| e6759d6610 | |||
|
|
96d50bfad5 | ||
| 40a62b5b5a | |||
| 20d3b46834 | |||
| 4229355a32 | |||
| db45509eaa | |||
| b13d748ec4 | |||
|
|
33d34c251b | ||
| e1abeeb547 | |||
|
|
ba150ac5d3 | ||
| 3594fdd761 | |||
| c6ec8ead32 | |||
| 43865e57f1 | |||
| 78836c0691 | |||
|
|
0f716ab4a7 | ||
|
|
515160b1ec | ||
| 807e8fc5f3 | |||
| 73595994d1 | |||
| dd89012919 | |||
| 7cec95b8a0 | |||
| 586d364772 | |||
| 6ebb88cb26 | |||
| 70d0b8690e | |||
| 174a399ee7 |
@@ -13,4 +13,24 @@ MonoBehaviour:
|
||||
m_Name: DefaultNetworkPrefabs
|
||||
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkPrefabsList
|
||||
IsDefault: 1
|
||||
List: []
|
||||
List:
|
||||
- Override: 0
|
||||
Prefab: {fileID: 7059514996416789454, guid: fe75fe22781f92b369675fdfc9657f7d, type: 3}
|
||||
SourcePrefabToOverride: {fileID: 0}
|
||||
SourceHashToOverride: 0
|
||||
OverridingTargetPrefab: {fileID: 0}
|
||||
- Override: 0
|
||||
Prefab: {fileID: 2809934685114486836, guid: ae082cf2d3a36684fb23d8ec0e643150, type: 3}
|
||||
SourcePrefabToOverride: {fileID: 0}
|
||||
SourceHashToOverride: 0
|
||||
OverridingTargetPrefab: {fileID: 0}
|
||||
- Override: 0
|
||||
Prefab: {fileID: 1170732337855516, guid: b5051c49d05768c73a8c42e1967fe4b2, type: 3}
|
||||
SourcePrefabToOverride: {fileID: 0}
|
||||
SourceHashToOverride: 0
|
||||
OverridingTargetPrefab: {fileID: 0}
|
||||
- Override: 0
|
||||
Prefab: {fileID: 1170732337855516, guid: d086cbb30c7bb4ba3a58cb2024fa0b31, type: 3}
|
||||
SourcePrefabToOverride: {fileID: 0}
|
||||
SourceHashToOverride: 0
|
||||
OverridingTargetPrefab: {fileID: 0}
|
||||
|
||||
133
Editor/CharacterSceneSetupGenerator.cs
Normal file
133
Editor/CharacterSceneSetupGenerator.cs
Normal file
@@ -0,0 +1,133 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
using UnityEditor.SceneManagement;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
// Project namespaces
|
||||
using MegaKoop.Steam; // SteamManager, SteamLobbyService
|
||||
using MegaKoop.Game.Networking; // SteamCoopNetworkManager, SteamP2PTransport, LobbyGameSceneCoordinator
|
||||
|
||||
public static class CharacterSceneSetupGenerator
|
||||
{
|
||||
private const string WizardPrefabPath = "Assets/Game/Hero/Wizard.prefab";
|
||||
|
||||
[MenuItem("Tools/MegaKoop/Setup Character Scene Objects", priority = 1000)]
|
||||
public static void SetupCharacterScene()
|
||||
{
|
||||
var scene = SceneManager.GetActiveScene();
|
||||
if (!scene.IsValid())
|
||||
{
|
||||
EditorUtility.DisplayDialog("Character Scene Setup", "No valid scene is open. Please open your CharacterScene and run again.", "OK");
|
||||
return;
|
||||
}
|
||||
|
||||
Undo.IncrementCurrentGroup();
|
||||
int group = Undo.GetCurrentGroup();
|
||||
|
||||
// 1) Ensure SteamServices root and required components
|
||||
var servicesRoot = GameObject.Find("SteamServices");
|
||||
if (servicesRoot == null)
|
||||
{
|
||||
servicesRoot = new GameObject("SteamServices");
|
||||
Undo.RegisterCreatedObjectUndo(servicesRoot, "Create SteamServices");
|
||||
}
|
||||
|
||||
EnsureComponent<SteamManager>(servicesRoot, "Add SteamManager");
|
||||
var lobby = EnsureComponent<SteamLobbyService>(servicesRoot, "Add SteamLobbyService");
|
||||
var coop = EnsureComponent<SteamCoopNetworkManager>(servicesRoot, "Add SteamCoopNetworkManager");
|
||||
EnsureComponent<SteamP2PTransport>(servicesRoot, "Add SteamP2PTransport");
|
||||
var coordinator = EnsureComponent<LobbyGameSceneCoordinator>(servicesRoot, "Add LobbyGameSceneCoordinator");
|
||||
|
||||
// Keep servicesRoot persistent across scenes to match runtime behavior
|
||||
if (!Application.isPlaying)
|
||||
{
|
||||
// Editor-time: mark as DontSaveInBuild is not needed; users expect this object in scene.
|
||||
// At runtime, code calls DontDestroyOnLoad itself.
|
||||
}
|
||||
|
||||
// 2) Ensure Wizard template exists in scene root
|
||||
var wizardInScene = GameObject.Find("Wizard");
|
||||
if (wizardInScene == null)
|
||||
{
|
||||
var prefab = AssetDatabase.LoadAssetAtPath<GameObject>(WizardPrefabPath);
|
||||
if (prefab != null)
|
||||
{
|
||||
var instantiated = PrefabUtility.InstantiatePrefab(prefab, scene) as GameObject;
|
||||
if (instantiated != null)
|
||||
{
|
||||
Undo.RegisterCreatedObjectUndo(instantiated, "Instantiate Wizard Template");
|
||||
instantiated.name = "Wizard"; // Ensure exact name for coordinator lookup
|
||||
instantiated.transform.SetPositionAndRotation(Vector3.zero, Quaternion.identity);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fallback: create a simple placeholder
|
||||
var placeholder = GameObject.CreatePrimitive(PrimitiveType.Capsule);
|
||||
Undo.RegisterCreatedObjectUndo(placeholder, "Create Wizard Placeholder");
|
||||
placeholder.name = "Wizard";
|
||||
placeholder.transform.SetPositionAndRotation(Vector3.zero, Quaternion.identity);
|
||||
// Controller components are optional for template; coordinator will add bridges on clones.
|
||||
placeholder.AddComponent<CharacterController>();
|
||||
placeholder.AddComponent<MegaKoop.Game.ThirdPersonCharacterController>();
|
||||
}
|
||||
}
|
||||
|
||||
// 3) Optional: ensure a basic ground so CharacterController can stand
|
||||
if (GameObject.Find("Ground") == null)
|
||||
{
|
||||
var ground = GameObject.CreatePrimitive(PrimitiveType.Plane);
|
||||
Undo.RegisterCreatedObjectUndo(ground, "Create Ground");
|
||||
ground.name = "Ground";
|
||||
ground.transform.position = Vector3.zero;
|
||||
ground.transform.localScale = Vector3.one * 2f;
|
||||
}
|
||||
|
||||
// 4) Optional: ensure there is at least one light
|
||||
if (Object.FindObjectOfType<Light>() == null)
|
||||
{
|
||||
var lightGO = new GameObject("Directional Light");
|
||||
Undo.RegisterCreatedObjectUndo(lightGO, "Create Directional Light");
|
||||
var light = lightGO.AddComponent<Light>();
|
||||
light.type = LightType.Directional;
|
||||
light.intensity = 1.1f;
|
||||
lightGO.transform.rotation = Quaternion.Euler(50f, -30f, 0f);
|
||||
}
|
||||
|
||||
// 5) Hint coordinator to use current scene name if it differs
|
||||
if (coordinator != null)
|
||||
{
|
||||
// If you want the coordinator to target this scene specifically, uncomment the next line:
|
||||
// SetPrivateField(coordinator, "characterSceneName", scene.name);
|
||||
}
|
||||
|
||||
EditorSceneManager.MarkSceneDirty(scene);
|
||||
Undo.CollapseUndoOperations(group);
|
||||
|
||||
EditorUtility.DisplayDialog("Character Scene Setup", "Character scene objects have been set up successfully.", "OK");
|
||||
}
|
||||
|
||||
private static T EnsureComponent<T>(GameObject go, string undoName) where T : Component
|
||||
{
|
||||
var c = go.GetComponent<T>();
|
||||
if (c == null)
|
||||
{
|
||||
c = Undo.AddComponent<T>(go);
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
// Example helper if you later want to set private serialized fields via reflection
|
||||
private static void SetPrivateField(object target, string fieldName, object value)
|
||||
{
|
||||
var t = target.GetType();
|
||||
var f = t.GetField(fieldName, System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
|
||||
if (f != null)
|
||||
{
|
||||
f.SetValue(target, value);
|
||||
EditorUtility.SetDirty((Object)target);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
2
Editor/CharacterSceneSetupGenerator.cs.meta
Normal file
2
Editor/CharacterSceneSetupGenerator.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 78e4bcab8a4eb484f99e4ef14054c921
|
||||
200
Editor/LobbyPanelBuilder.cs
Normal file
200
Editor/LobbyPanelBuilder.cs
Normal file
@@ -0,0 +1,200 @@
|
||||
#if UNITY_EDITOR
|
||||
using TMPro;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace MegaKoop.EditorTools
|
||||
{
|
||||
internal sealed class LobbyPanelBuilder
|
||||
{
|
||||
private readonly Transform _parent;
|
||||
|
||||
internal LobbyPanelBuilder(Transform parent)
|
||||
{
|
||||
_parent = parent;
|
||||
}
|
||||
|
||||
internal GameObject Build()
|
||||
{
|
||||
var panelLobby = UGUIBuilderUtils.CreatePanel(_parent, "Panel_Lobby", new Vector2(1100, 820));
|
||||
panelLobby.SetActive(false);
|
||||
|
||||
var lobbyContainer = UGUIBuilderUtils.CreateVerticalGroup(
|
||||
panelLobby.transform,
|
||||
"Lobby_VLayout",
|
||||
16f,
|
||||
TextAnchor.UpperCenter,
|
||||
new RectOffset(24, 24, 24, 24));
|
||||
|
||||
var lobbyHeader = UGUIBuilderUtils.CreateHorizontalGroup(
|
||||
lobbyContainer.transform,
|
||||
"Lobby_Header",
|
||||
10f,
|
||||
TextAnchor.MiddleCenter,
|
||||
new RectOffset(0, 0, 0, 10));
|
||||
UGUIBuilderUtils.CreateText(lobbyHeader.transform, "Text_LobbyTitle", "MULTIPLAYER LOBBY", 36, TextAnchor.MiddleLeft, new Color(0.7f, 1f, 0.7f), FontStyles.Bold);
|
||||
UGUIBuilderUtils.CreateText(lobbyHeader.transform, "Text_Status", "OFFLINE", 18, TextAnchor.MiddleRight, new Color(0.8f, 0.8f, 0.8f), FontStyles.Bold);
|
||||
|
||||
var codeGroup = UGUIBuilderUtils.CreateVerticalGroup(
|
||||
lobbyContainer.transform,
|
||||
"Lobby_CodeGroup",
|
||||
8f,
|
||||
TextAnchor.MiddleCenter,
|
||||
new RectOffset(10, 10, 10, 10));
|
||||
UGUIBuilderUtils.CreateText(codeGroup.transform, "Text_LobbyCodeLabel", "LOBBY CODE", 16, TextAnchor.MiddleCenter, new Color(0.8f, 0.8f, 0.8f), FontStyles.Bold);
|
||||
var codeRow = UGUIBuilderUtils.CreateHorizontalGroup(
|
||||
codeGroup.transform,
|
||||
"Lobby_CodeRow",
|
||||
10f,
|
||||
TextAnchor.MiddleCenter,
|
||||
new RectOffset(0, 0, 0, 0));
|
||||
UGUIBuilderUtils.CreateText(codeRow.transform, "Text_LobbyCodeValue", "------", 44, TextAnchor.MiddleCenter, new Color(0.7f, 1f, 0.7f), FontStyles.Bold);
|
||||
UGUIBuilderUtils.CreateMenuButton(codeRow.transform, "Button_CopyCode", "COPY");
|
||||
UGUIBuilderUtils.CreateText(codeGroup.transform, "Text_LobbyCodeHint", "Share this code with friends to invite them", 12, TextAnchor.MiddleCenter, new Color(0.8f, 0.8f, 0.8f), FontStyles.Normal);
|
||||
|
||||
var tabs = UGUIBuilderUtils.CreateHorizontalGroup(
|
||||
lobbyContainer.transform,
|
||||
"Lobby_Tabs",
|
||||
0f,
|
||||
TextAnchor.MiddleCenter,
|
||||
new RectOffset(0, 0, 0, 0));
|
||||
UGUIBuilderUtils.CreateMenuButton(tabs.transform, "Button_HostTab", "HOST LOBBY");
|
||||
UGUIBuilderUtils.CreateMenuButton(tabs.transform, "Button_JoinTab", "JOIN LOBBY");
|
||||
|
||||
var joinGroup = UGUIBuilderUtils.CreateVerticalGroup(
|
||||
lobbyContainer.transform,
|
||||
"Group_Join",
|
||||
10f,
|
||||
TextAnchor.UpperCenter,
|
||||
new RectOffset(10, 10, 10, 10));
|
||||
var joinRow = UGUIBuilderUtils.CreateHorizontalGroup(
|
||||
joinGroup.transform,
|
||||
"Join_Row",
|
||||
10f,
|
||||
TextAnchor.MiddleCenter,
|
||||
new RectOffset(0, 0, 0, 0));
|
||||
UGUIBuilderUtils.CreateInputField(joinRow.transform, "Input_LobbyCode", "Enter 6-digit code...");
|
||||
UGUIBuilderUtils.CreateMenuButton(joinGroup.transform, "Button_Connect", "CONNECT");
|
||||
|
||||
var hostGroup = UGUIBuilderUtils.CreateVerticalGroup(
|
||||
lobbyContainer.transform,
|
||||
"Group_Host",
|
||||
10f,
|
||||
TextAnchor.UpperCenter,
|
||||
new RectOffset(10, 10, 10, 10));
|
||||
UGUIBuilderUtils.CreateDropdown(hostGroup.transform, "Dropdown_MaxPlayers", new[] { "2", "3", "4", "8" });
|
||||
UGUIBuilderUtils.CreateToggle(hostGroup.transform, "Toggle_PublicLobby", "Public", true);
|
||||
UGUIBuilderUtils.CreateMenuButton(hostGroup.transform, "Button_CreateLobby", "CREATE LOBBY");
|
||||
|
||||
var playersHeader = UGUIBuilderUtils.CreateHorizontalGroup(
|
||||
lobbyContainer.transform,
|
||||
"Players_Header",
|
||||
10f,
|
||||
TextAnchor.MiddleLeft,
|
||||
new RectOffset(0, 0, 0, 0));
|
||||
UGUIBuilderUtils.CreateText(playersHeader.transform, "Text_PlayersTitle", "PLAYERS", 20, TextAnchor.MiddleLeft, Color.white, FontStyles.Bold);
|
||||
UGUIBuilderUtils.CreateText(playersHeader.transform, "Text_PlayerCount", "0/4", 18, TextAnchor.MiddleRight, new Color(0.7f, 1f, 0.7f), FontStyles.Bold);
|
||||
|
||||
var scroll = UGUIBuilderUtils.CreateScrollList(
|
||||
lobbyContainer.transform,
|
||||
out var playersContent,
|
||||
"Scroll_Players",
|
||||
"Viewport",
|
||||
"Content_PlayersList");
|
||||
UGUIBuilderUtils.CreateText(lobbyContainer.transform, "Empty_Players", "Waiting for players...", 16, TextAnchor.MiddleCenter, new Color(0.8f, 0.8f, 0.8f), FontStyles.Italic);
|
||||
|
||||
var template = new GameObject("PlayerItemTemplate", typeof(RectTransform), typeof(HorizontalLayoutGroup));
|
||||
template.transform.SetParent(playersContent, false);
|
||||
var hlg = template.GetComponent<HorizontalLayoutGroup>();
|
||||
hlg.childAlignment = TextAnchor.MiddleLeft;
|
||||
hlg.spacing = 12;
|
||||
hlg.childControlWidth = false;
|
||||
hlg.childForceExpandWidth = true;
|
||||
var avatar = UGUIBuilderUtils.CreateImage(template.transform, "Image_Avatar", new Color(0.3f, 0.6f, 0.3f));
|
||||
var name = UGUIBuilderUtils.CreateText(template.transform, "Text_PlayerName", "Player", 18, TextAnchor.MiddleLeft, Color.white, FontStyles.Bold);
|
||||
var status = UGUIBuilderUtils.CreateText(template.transform, "Text_PlayerStatus", "NOT READY", 14, TextAnchor.MiddleRight, new Color(0.8f, 0.8f, 0.8f), FontStyles.Bold);
|
||||
((RectTransform)avatar.transform).sizeDelta = new Vector2(40, 40);
|
||||
template.SetActive(false);
|
||||
|
||||
var hostControls = UGUIBuilderUtils.CreateHorizontalGroup(
|
||||
lobbyContainer.transform,
|
||||
"Host_Controls",
|
||||
10f,
|
||||
TextAnchor.MiddleCenter,
|
||||
new RectOffset(0, 0, 0, 0));
|
||||
UGUIBuilderUtils.CreateMenuButton(hostControls.transform, "Button_InviteFriends", "INVITE FRIENDS");
|
||||
UGUIBuilderUtils.CreateMenuButton(hostControls.transform, "Button_KickSelected", "KICK SELECTED");
|
||||
|
||||
var friendsOverlay = new GameObject("Panel_Friends", typeof(RectTransform), typeof(Image));
|
||||
friendsOverlay.transform.SetParent(panelLobby.transform, false);
|
||||
var ovRT = (RectTransform)friendsOverlay.transform;
|
||||
ovRT.anchorMin = Vector2.zero;
|
||||
ovRT.anchorMax = Vector2.one;
|
||||
ovRT.offsetMin = Vector2.zero;
|
||||
ovRT.offsetMax = Vector2.zero;
|
||||
var ovImg = friendsOverlay.GetComponent<Image>();
|
||||
ovImg.color = new Color(0, 0, 0, 0.55f);
|
||||
friendsOverlay.SetActive(false);
|
||||
|
||||
var closeBg = new GameObject("Button_CloseFriendsOverlay", typeof(RectTransform), typeof(Image), typeof(Button));
|
||||
closeBg.transform.SetParent(friendsOverlay.transform, false);
|
||||
var closeBgRT = (RectTransform)closeBg.transform;
|
||||
closeBgRT.anchorMin = Vector2.zero;
|
||||
closeBgRT.anchorMax = Vector2.one;
|
||||
closeBgRT.offsetMin = Vector2.zero;
|
||||
closeBgRT.offsetMax = Vector2.zero;
|
||||
var closeBgImg = closeBg.GetComponent<Image>();
|
||||
closeBgImg.color = new Color(0, 0, 0, 0);
|
||||
|
||||
var friendsWindow = UGUIBuilderUtils.CreatePanel(friendsOverlay.transform, "Friends_Window", new Vector2(900, 420));
|
||||
var friendsV = UGUIBuilderUtils.CreateVerticalGroup(
|
||||
friendsWindow.transform,
|
||||
"Friends_VLayout",
|
||||
8f,
|
||||
TextAnchor.UpperCenter,
|
||||
new RectOffset(16, 16, 16, 16));
|
||||
UGUIBuilderUtils.CreateText(friendsV.transform, "Text_FriendsTitle", "INVITE FRIENDS", 24, TextAnchor.MiddleCenter, Color.white, FontStyles.Bold);
|
||||
UGUIBuilderUtils.CreateText(friendsV.transform, "Text_FriendsHint", "Select a friend to send a Steam invite.", 12, TextAnchor.MiddleCenter, new Color(0.8f, 0.8f, 0.8f), FontStyles.Normal);
|
||||
UGUIBuilderUtils.CreateScrollList(friendsV.transform, out var friendsContent, "Scroll_Friends", "Viewport", "Content_FriendsList");
|
||||
var vlgFriends = friendsContent.GetComponent<VerticalLayoutGroup>();
|
||||
if (vlgFriends)
|
||||
{
|
||||
Object.DestroyImmediate(vlgFriends);
|
||||
}
|
||||
var gridFriends = friendsContent.gameObject.AddComponent<GridLayoutGroup>();
|
||||
gridFriends.cellSize = new Vector2(72, 72);
|
||||
gridFriends.spacing = new Vector2(10, 10);
|
||||
gridFriends.startAxis = GridLayoutGroup.Axis.Horizontal;
|
||||
var csfFriends = friendsContent.GetComponent<ContentSizeFitter>();
|
||||
if (csfFriends == null)
|
||||
{
|
||||
csfFriends = friendsContent.gameObject.AddComponent<ContentSizeFitter>();
|
||||
}
|
||||
csfFriends.verticalFit = ContentSizeFitter.FitMode.PreferredSize;
|
||||
UGUIBuilderUtils.CreateText(friendsV.transform, "Empty_Friends", "No friends found.", 14, TextAnchor.MiddleCenter, new Color(0.8f, 0.8f, 0.8f), FontStyles.Italic);
|
||||
var friendsFooter = UGUIBuilderUtils.CreateHorizontalGroup(
|
||||
friendsV.transform,
|
||||
"Friends_Footer",
|
||||
8f,
|
||||
TextAnchor.MiddleCenter,
|
||||
new RectOffset(0, 0, 0, 0));
|
||||
UGUIBuilderUtils.CreateMenuButton(friendsFooter.transform, "Button_BackFromFriends", "BACK");
|
||||
|
||||
UGUIBuilderUtils.CreateMenuButton(lobbyContainer.transform, "Button_ToggleReady", "TOGGLE READY");
|
||||
|
||||
var footer = UGUIBuilderUtils.CreateHorizontalGroup(
|
||||
lobbyContainer.transform,
|
||||
"Lobby_Footer",
|
||||
10f,
|
||||
TextAnchor.MiddleCenter,
|
||||
new RectOffset(0, 0, 0, 0));
|
||||
UGUIBuilderUtils.CreateMenuButton(footer.transform, "Button_StartGame", "START GAME");
|
||||
UGUIBuilderUtils.CreateMenuButton(footer.transform, "Button_LeaveLobby", "LEAVE LOBBY");
|
||||
UGUIBuilderUtils.CreateMenuButton(footer.transform, "Button_BackFromLobby", "BACK TO MENU");
|
||||
|
||||
return panelLobby;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
2
Editor/LobbyPanelBuilder.cs.meta
Normal file
2
Editor/LobbyPanelBuilder.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 46d584193d4545f45b0a8a344fa11093
|
||||
40
Editor/MainMenuPanelBuilder.cs
Normal file
40
Editor/MainMenuPanelBuilder.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
#if UNITY_EDITOR
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace MegaKoop.EditorTools
|
||||
{
|
||||
internal sealed class MainMenuPanelBuilder
|
||||
{
|
||||
private readonly Transform _parent;
|
||||
|
||||
internal MainMenuPanelBuilder(Transform parent)
|
||||
{
|
||||
_parent = parent;
|
||||
}
|
||||
|
||||
internal GameObject Build()
|
||||
{
|
||||
var panelMain = UGUIBuilderUtils.CreatePanel(_parent, "Panel_MainMenu", new Vector2(900, 800));
|
||||
|
||||
var mainContainer = UGUIBuilderUtils.CreateVerticalGroup(
|
||||
panelMain.transform,
|
||||
"Main_VLayout",
|
||||
20f,
|
||||
TextAnchor.MiddleCenter,
|
||||
new RectOffset(30, 30, 30, 30));
|
||||
|
||||
UGUIBuilderUtils.CreateText(mainContainer.transform, "Text_Title", "MEGA KOOP", 70, TextAnchor.MiddleCenter, Color.white, FontStyles.Bold);
|
||||
UGUIBuilderUtils.CreateText(mainContainer.transform, "Text_Subtitle", "CO-OP ADVENTURE", 20, TextAnchor.MiddleCenter, new Color(0.8f, 0.8f, 0.8f), FontStyles.Normal);
|
||||
UGUIBuilderUtils.CreateSpacer(mainContainer.transform, 20f);
|
||||
|
||||
UGUIBuilderUtils.CreateMenuButton(mainContainer.transform, "Button_Multiplayer", "MULTIPLAYER");
|
||||
UGUIBuilderUtils.CreateMenuButton(mainContainer.transform, "Button_Settings", "SETTINGS");
|
||||
UGUIBuilderUtils.CreateMenuButton(mainContainer.transform, "Button_Quit", "QUIT GAME", isDanger: true);
|
||||
|
||||
return panelMain;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
2
Editor/MainMenuPanelBuilder.cs.meta
Normal file
2
Editor/MainMenuPanelBuilder.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c43d178d57dd2ae4db117649aad9e5b7
|
||||
67
Editor/SettingsPanelBuilder.cs
Normal file
67
Editor/SettingsPanelBuilder.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
#if UNITY_EDITOR
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace MegaKoop.EditorTools
|
||||
{
|
||||
internal sealed class SettingsPanelBuilder
|
||||
{
|
||||
private readonly Transform _parent;
|
||||
|
||||
internal SettingsPanelBuilder(Transform parent)
|
||||
{
|
||||
_parent = parent;
|
||||
}
|
||||
|
||||
internal GameObject Build()
|
||||
{
|
||||
var panelSettings = UGUIBuilderUtils.CreatePanel(_parent, "Panel_Settings", new Vector2(900, 800));
|
||||
panelSettings.SetActive(false);
|
||||
|
||||
var settingsContainer = UGUIBuilderUtils.CreateVerticalGroup(
|
||||
panelSettings.transform,
|
||||
"Settings_VLayout",
|
||||
16f,
|
||||
TextAnchor.UpperCenter,
|
||||
new RectOffset(30, 30, 30, 30));
|
||||
|
||||
UGUIBuilderUtils.CreateText(settingsContainer.transform, "Text_SettingsTitle", "SETTINGS", 48, TextAnchor.MiddleCenter, Color.white, FontStyles.Bold);
|
||||
UGUIBuilderUtils.CreateSpacer(settingsContainer.transform, 10f);
|
||||
|
||||
var gfxGroup = UGUIBuilderUtils.CreateVerticalGroup(
|
||||
settingsContainer.transform,
|
||||
"Graphics_Group",
|
||||
10f,
|
||||
TextAnchor.UpperLeft,
|
||||
new RectOffset(10, 10, 10, 10));
|
||||
UGUIBuilderUtils.CreateText(gfxGroup.transform, "Text_Graphics", "Graphics", 24, TextAnchor.MiddleLeft, Color.white, FontStyles.Bold);
|
||||
UGUIBuilderUtils.CreateDropdown(gfxGroup.transform, "Dropdown_Quality", new[] { "Low", "Medium", "High", "Ultra" });
|
||||
UGUIBuilderUtils.CreateToggle(gfxGroup.transform, "Toggle_Fullscreen", "Fullscreen", true);
|
||||
UGUIBuilderUtils.CreateDropdown(gfxGroup.transform, "Dropdown_Resolution", new[] { "1280x720", "1920x1080", "2560x1440", "3840x2160" });
|
||||
|
||||
var audioGroup = UGUIBuilderUtils.CreateVerticalGroup(
|
||||
settingsContainer.transform,
|
||||
"Audio_Group",
|
||||
10f,
|
||||
TextAnchor.UpperLeft,
|
||||
new RectOffset(10, 10, 10, 10));
|
||||
UGUIBuilderUtils.CreateText(audioGroup.transform, "Text_Audio", "Audio", 24, TextAnchor.MiddleLeft, Color.white, FontStyles.Bold);
|
||||
UGUIBuilderUtils.CreateLabeledSlider(audioGroup.transform, "Master Volume", "Slider_MasterVolume", 0, 100, 100);
|
||||
UGUIBuilderUtils.CreateLabeledSlider(audioGroup.transform, "Music Volume", "Slider_MusicVolume", 0, 100, 80);
|
||||
UGUIBuilderUtils.CreateLabeledSlider(audioGroup.transform, "SFX Volume", "Slider_SFXVolume", 0, 100, 100);
|
||||
|
||||
var buttonsRow = UGUIBuilderUtils.CreateHorizontalGroup(
|
||||
settingsContainer.transform,
|
||||
"Settings_Buttons",
|
||||
10f,
|
||||
TextAnchor.MiddleCenter,
|
||||
new RectOffset(0, 0, 0, 0));
|
||||
UGUIBuilderUtils.CreateMenuButton(buttonsRow.transform, "Button_ApplySettings", "APPLY");
|
||||
UGUIBuilderUtils.CreateMenuButton(buttonsRow.transform, "Button_BackFromSettings", "BACK");
|
||||
|
||||
return panelSettings;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
2
Editor/SettingsPanelBuilder.cs.meta
Normal file
2
Editor/SettingsPanelBuilder.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1f247737932b5ac4f83890f357d265f6
|
||||
432
Editor/UGUIBuilderUtils.cs
Normal file
432
Editor/UGUIBuilderUtils.cs
Normal file
@@ -0,0 +1,432 @@
|
||||
#if UNITY_EDITOR
|
||||
using System.Linq;
|
||||
using TMPro;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace MegaKoop.EditorTools
|
||||
{
|
||||
internal static class UGUIBuilderUtils
|
||||
{
|
||||
internal static GameObject CreatePanel(Transform parent, string name, Vector2 size)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(Image));
|
||||
go.transform.SetParent(parent, false);
|
||||
var rt = (RectTransform)go.transform;
|
||||
rt.anchorMin = rt.anchorMax = new Vector2(0.5f, 0.5f);
|
||||
rt.pivot = new Vector2(0.5f, 0.5f);
|
||||
rt.sizeDelta = size;
|
||||
var img = go.GetComponent<Image>();
|
||||
img.color = new Color(0.13f, 0.13f, 0.13f, 0.95f);
|
||||
return go;
|
||||
}
|
||||
|
||||
internal static GameObject CreateVerticalGroup(Transform parent, string name, float spacing, TextAnchor align, RectOffset padding)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(VerticalLayoutGroup), typeof(ContentSizeFitter));
|
||||
go.transform.SetParent(parent, false);
|
||||
var rt = (RectTransform)go.transform;
|
||||
rt.anchorMin = new Vector2(0, 0);
|
||||
rt.anchorMax = new Vector2(1, 1);
|
||||
rt.offsetMin = Vector2.zero;
|
||||
rt.offsetMax = Vector2.zero;
|
||||
var vlg = go.GetComponent<VerticalLayoutGroup>();
|
||||
vlg.spacing = spacing;
|
||||
vlg.childAlignment = align;
|
||||
vlg.padding = padding;
|
||||
vlg.childForceExpandWidth = true;
|
||||
vlg.childControlWidth = true;
|
||||
vlg.childControlHeight = false;
|
||||
var fitter = go.GetComponent<ContentSizeFitter>();
|
||||
fitter.verticalFit = ContentSizeFitter.FitMode.PreferredSize;
|
||||
fitter.horizontalFit = ContentSizeFitter.FitMode.Unconstrained;
|
||||
return go;
|
||||
}
|
||||
|
||||
internal static GameObject CreateHorizontalGroup(Transform parent, string name, float spacing, TextAnchor align, RectOffset padding)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(HorizontalLayoutGroup));
|
||||
go.transform.SetParent(parent, false);
|
||||
var rt = (RectTransform)go.transform;
|
||||
rt.anchorMin = new Vector2(0, 0);
|
||||
rt.anchorMax = new Vector2(1, 0);
|
||||
rt.pivot = new Vector2(0.5f, 0.5f);
|
||||
rt.sizeDelta = new Vector2(0, 60);
|
||||
var hlg = go.GetComponent<HorizontalLayoutGroup>();
|
||||
hlg.spacing = spacing;
|
||||
hlg.childAlignment = align;
|
||||
hlg.padding = padding;
|
||||
hlg.childControlWidth = true;
|
||||
hlg.childForceExpandWidth = true;
|
||||
return go;
|
||||
}
|
||||
|
||||
internal static GameObject CreateText(Transform parent, string name, string text, int fontSize, TextAnchor anchor, Color color, FontStyles fontStyle)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(TextMeshProUGUI), typeof(LayoutElement));
|
||||
go.transform.SetParent(parent, false);
|
||||
var tmp = go.GetComponent<TextMeshProUGUI>();
|
||||
tmp.text = text;
|
||||
tmp.fontSize = fontSize;
|
||||
tmp.color = color;
|
||||
tmp.alignment = MapAlignment(anchor);
|
||||
tmp.fontStyle = fontStyle;
|
||||
tmp.enableWordWrapping = false;
|
||||
tmp.raycastTarget = false;
|
||||
if (TMP_Settings.defaultFontAsset != null)
|
||||
{
|
||||
tmp.font = TMP_Settings.defaultFontAsset;
|
||||
}
|
||||
var le = go.GetComponent<LayoutElement>();
|
||||
le.minHeight = Mathf.Max(24, fontSize + 12);
|
||||
var rt = (RectTransform)go.transform;
|
||||
rt.sizeDelta = new Vector2(0, fontSize + 20);
|
||||
return go;
|
||||
}
|
||||
|
||||
private static TextAlignmentOptions MapAlignment(TextAnchor anchor)
|
||||
{
|
||||
switch (anchor)
|
||||
{
|
||||
case TextAnchor.UpperLeft: return TextAlignmentOptions.TopLeft;
|
||||
case TextAnchor.UpperCenter: return TextAlignmentOptions.Top;
|
||||
case TextAnchor.UpperRight: return TextAlignmentOptions.TopRight;
|
||||
case TextAnchor.MiddleLeft: return TextAlignmentOptions.MidlineLeft;
|
||||
case TextAnchor.MiddleCenter: return TextAlignmentOptions.Midline;
|
||||
case TextAnchor.MiddleRight: return TextAlignmentOptions.MidlineRight;
|
||||
case TextAnchor.LowerLeft: return TextAlignmentOptions.BottomLeft;
|
||||
case TextAnchor.LowerCenter: return TextAlignmentOptions.Bottom;
|
||||
case TextAnchor.LowerRight: return TextAlignmentOptions.BottomRight;
|
||||
default: return TextAlignmentOptions.Center;
|
||||
}
|
||||
}
|
||||
|
||||
internal static GameObject CreateMenuButton(Transform parent, string name, string label, bool isDanger = false)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(Image), typeof(Button));
|
||||
go.transform.SetParent(parent, false);
|
||||
var img = go.GetComponent<Image>();
|
||||
img.color = isDanger ? new Color(0.5f, 0.15f, 0.15f, 0.9f) : new Color(0.25f, 0.5f, 0.25f, 0.9f);
|
||||
var rt = (RectTransform)go.transform;
|
||||
rt.sizeDelta = new Vector2(0, 48);
|
||||
var leBtn = go.AddComponent<LayoutElement>();
|
||||
leBtn.flexibleWidth = 1;
|
||||
leBtn.minHeight = 48;
|
||||
var text = CreateText(go.transform, "Text", label, 20, TextAnchor.MiddleCenter, Color.white, FontStyles.Bold);
|
||||
var textRT = (RectTransform)text.transform;
|
||||
textRT.anchorMin = new Vector2(0, 0);
|
||||
textRT.anchorMax = new Vector2(1, 1);
|
||||
textRT.offsetMin = Vector2.zero;
|
||||
textRT.offsetMax = Vector2.zero;
|
||||
return go;
|
||||
}
|
||||
|
||||
internal static GameObject CreateInputField(Transform parent, string name, string placeholder)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(Image), typeof(TMP_InputField));
|
||||
go.transform.SetParent(parent, false);
|
||||
var img = go.GetComponent<Image>();
|
||||
img.color = new Color(0.1f, 0.1f, 0.1f, 0.9f);
|
||||
var rt = (RectTransform)go.transform;
|
||||
rt.sizeDelta = new Vector2(600, 50);
|
||||
var viewport = new GameObject("TextViewport", typeof(RectTransform));
|
||||
viewport.transform.SetParent(go.transform, false);
|
||||
var viewportRT = (RectTransform)viewport.transform;
|
||||
viewportRT.anchorMin = new Vector2(0, 0);
|
||||
viewportRT.anchorMax = new Vector2(1, 1);
|
||||
viewportRT.offsetMin = new Vector2(10, 6);
|
||||
viewportRT.offsetMax = new Vector2(-10, -6);
|
||||
var text = CreateText(viewport.transform, "Text", string.Empty, 20, TextAnchor.MiddleLeft, Color.white, FontStyles.Normal);
|
||||
var placeholderGO = CreateText(viewport.transform, "Placeholder", placeholder, 18, TextAnchor.MiddleLeft, new Color(0.7f, 0.7f, 0.7f), FontStyles.Italic);
|
||||
var input = go.GetComponent<TMP_InputField>();
|
||||
input.textViewport = viewportRT;
|
||||
input.textComponent = text.GetComponent<TextMeshProUGUI>();
|
||||
input.placeholder = placeholderGO.GetComponent<TextMeshProUGUI>();
|
||||
var tRT = (RectTransform)text.transform;
|
||||
tRT.anchorMin = new Vector2(0, 0);
|
||||
tRT.anchorMax = new Vector2(1, 1);
|
||||
tRT.offsetMin = new Vector2(10, 0);
|
||||
tRT.offsetMax = new Vector2(-10, 0);
|
||||
var pRT = (RectTransform)placeholderGO.transform;
|
||||
pRT.anchorMin = new Vector2(0, 0);
|
||||
pRT.anchorMax = new Vector2(1, 1);
|
||||
pRT.offsetMin = new Vector2(10, 0);
|
||||
pRT.offsetMax = new Vector2(-10, 0);
|
||||
return go;
|
||||
}
|
||||
|
||||
internal static GameObject CreateDropdown(Transform parent, string name, string[] options)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(Image), typeof(TMP_Dropdown));
|
||||
go.transform.SetParent(parent, false);
|
||||
var img = go.GetComponent<Image>();
|
||||
img.color = new Color(0.2f, 0.2f, 0.2f, 0.9f);
|
||||
var rt = (RectTransform)go.transform;
|
||||
rt.sizeDelta = new Vector2(600, 50);
|
||||
|
||||
var caption = CreateText(go.transform, "Label", options.FirstOrDefault() ?? "Option", 18, TextAnchor.MiddleLeft, Color.white, FontStyles.Normal);
|
||||
var arrow = CreateText(go.transform, "Arrow", "▼", 18, TextAnchor.MiddleRight, Color.white, FontStyles.Bold);
|
||||
|
||||
var template = new GameObject("Template", typeof(RectTransform), typeof(Image), typeof(ScrollRect));
|
||||
template.transform.SetParent(go.transform, false);
|
||||
var templateRT = (RectTransform)template.transform;
|
||||
templateRT.anchorMin = new Vector2(0, 0);
|
||||
templateRT.anchorMax = new Vector2(1, 0);
|
||||
templateRT.pivot = new Vector2(0.5f, 1f);
|
||||
templateRT.sizeDelta = new Vector2(0, 220);
|
||||
template.SetActive(false);
|
||||
var templateImg = template.GetComponent<Image>();
|
||||
templateImg.color = new Color(0.1f, 0.1f, 0.1f, 0.95f);
|
||||
|
||||
var tplCanvas = template.GetComponent<Canvas>();
|
||||
if (tplCanvas == null)
|
||||
{
|
||||
tplCanvas = template.AddComponent<Canvas>();
|
||||
}
|
||||
tplCanvas.overrideSorting = true;
|
||||
tplCanvas.sortingOrder = 5000;
|
||||
if (!template.GetComponent<GraphicRaycaster>())
|
||||
{
|
||||
template.AddComponent<GraphicRaycaster>();
|
||||
}
|
||||
|
||||
var viewport = new GameObject("Viewport", typeof(RectTransform), typeof(Mask), typeof(Image));
|
||||
viewport.transform.SetParent(template.transform, false);
|
||||
var viewportRT = (RectTransform)viewport.transform;
|
||||
viewportRT.anchorMin = new Vector2(0, 0);
|
||||
viewportRT.anchorMax = new Vector2(1, 1);
|
||||
viewportRT.offsetMin = Vector2.zero;
|
||||
viewportRT.offsetMax = Vector2.zero;
|
||||
var vImg = viewport.GetComponent<Image>();
|
||||
vImg.color = new Color(0, 0, 0, 0.2f);
|
||||
vImg.raycastTarget = false;
|
||||
var mask = viewport.GetComponent<Mask>();
|
||||
mask.showMaskGraphic = false;
|
||||
|
||||
var content = new GameObject("Content", typeof(RectTransform), typeof(VerticalLayoutGroup));
|
||||
content.transform.SetParent(viewport.transform, false);
|
||||
var contentRT = (RectTransform)content.transform;
|
||||
contentRT.anchorMin = new Vector2(0, 1);
|
||||
contentRT.anchorMax = new Vector2(1, 1);
|
||||
contentRT.pivot = new Vector2(0.5f, 1f);
|
||||
var vlg = content.GetComponent<VerticalLayoutGroup>();
|
||||
vlg.spacing = 4;
|
||||
vlg.childForceExpandWidth = true;
|
||||
vlg.childControlHeight = true;
|
||||
|
||||
var item = new GameObject("Item", typeof(RectTransform), typeof(Toggle));
|
||||
item.transform.SetParent(content.transform, false);
|
||||
var itemRT = (RectTransform)item.transform;
|
||||
itemRT.sizeDelta = new Vector2(0, 30);
|
||||
var itemBG = new GameObject("Item Background", typeof(RectTransform), typeof(Image));
|
||||
itemBG.transform.SetParent(item.transform, false);
|
||||
var itemBGImg = itemBG.GetComponent<Image>();
|
||||
itemBGImg.color = new Color(0.2f, 0.2f, 0.2f, 0.9f);
|
||||
var itemCheck = new GameObject("Item Checkmark", typeof(RectTransform), typeof(Image));
|
||||
itemCheck.transform.SetParent(itemBG.transform, false);
|
||||
var itemCheckImg = itemCheck.GetComponent<Image>();
|
||||
itemCheckImg.color = new Color(0.7f, 1f, 0.7f, 1f);
|
||||
var itemLabelGO = CreateText(item.transform, "Item Label", "Option", 18, TextAnchor.MiddleLeft, Color.white, FontStyles.Normal);
|
||||
|
||||
var bgRT = (RectTransform)itemBG.transform;
|
||||
bgRT.anchorMin = new Vector2(0, 0);
|
||||
bgRT.anchorMax = new Vector2(1, 1);
|
||||
bgRT.offsetMin = Vector2.zero;
|
||||
bgRT.offsetMax = Vector2.zero;
|
||||
var ckRT = (RectTransform)itemCheck.transform;
|
||||
ckRT.anchorMin = new Vector2(0, 0.5f);
|
||||
ckRT.anchorMax = new Vector2(0, 0.5f);
|
||||
ckRT.pivot = new Vector2(0, 0.5f);
|
||||
ckRT.sizeDelta = new Vector2(18, 18);
|
||||
ckRT.anchoredPosition = new Vector2(6, 0);
|
||||
var itemLabelRT = (RectTransform)itemLabelGO.transform;
|
||||
itemLabelRT.anchorMin = new Vector2(0, 0);
|
||||
itemLabelRT.anchorMax = new Vector2(1, 1);
|
||||
itemLabelRT.offsetMin = new Vector2(28, 0);
|
||||
itemLabelRT.offsetMax = new Vector2(-6, 0);
|
||||
|
||||
var toggle = item.GetComponent<Toggle>();
|
||||
toggle.targetGraphic = itemBGImg;
|
||||
toggle.graphic = itemCheckImg;
|
||||
|
||||
var dropdown = go.GetComponent<TMP_Dropdown>();
|
||||
dropdown.template = templateRT;
|
||||
dropdown.captionText = caption.GetComponent<TextMeshProUGUI>();
|
||||
dropdown.itemText = itemLabelGO.GetComponent<TextMeshProUGUI>();
|
||||
dropdown.options = options.Select(o => new TMP_Dropdown.OptionData(o)).ToList();
|
||||
dropdown.alphaFadeSpeed = 0.15f;
|
||||
dropdown.RefreshShownValue();
|
||||
|
||||
var scrollRect = template.GetComponent<ScrollRect>();
|
||||
scrollRect.viewport = viewportRT;
|
||||
scrollRect.content = (RectTransform)content.transform;
|
||||
scrollRect.horizontal = false;
|
||||
scrollRect.vertical = true;
|
||||
return go;
|
||||
}
|
||||
|
||||
internal static GameObject CreateSlider(Transform parent, string name, float min, float max, float value)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(Slider));
|
||||
go.transform.SetParent(parent, false);
|
||||
var slider = go.GetComponent<Slider>();
|
||||
slider.minValue = min;
|
||||
slider.maxValue = max;
|
||||
slider.value = value;
|
||||
slider.direction = Slider.Direction.LeftToRight;
|
||||
slider.wholeNumbers = true;
|
||||
var rt = (RectTransform)go.transform;
|
||||
rt.sizeDelta = new Vector2(600, 30);
|
||||
|
||||
var background = new GameObject("Background", typeof(RectTransform), typeof(Image));
|
||||
background.transform.SetParent(go.transform, false);
|
||||
var bgRT = (RectTransform)background.transform;
|
||||
bgRT.anchorMin = new Vector2(0, 0.25f);
|
||||
bgRT.anchorMax = new Vector2(1, 0.75f);
|
||||
bgRT.offsetMin = Vector2.zero;
|
||||
bgRT.offsetMax = Vector2.zero;
|
||||
var bgImg = background.GetComponent<Image>();
|
||||
bgImg.color = new Color(0.1f, 0.1f, 0.1f, 1f);
|
||||
|
||||
var fillArea = new GameObject("Fill Area", typeof(RectTransform));
|
||||
fillArea.transform.SetParent(go.transform, false);
|
||||
var faRT = (RectTransform)fillArea.transform;
|
||||
faRT.anchorMin = new Vector2(0, 0.25f);
|
||||
faRT.anchorMax = new Vector2(1, 0.75f);
|
||||
faRT.offsetMin = new Vector2(10, 0);
|
||||
faRT.offsetMax = new Vector2(-10, 0);
|
||||
|
||||
var fill = new GameObject("Fill", typeof(RectTransform), typeof(Image));
|
||||
fill.transform.SetParent(fillArea.transform, false);
|
||||
var fillImg = fill.GetComponent<Image>();
|
||||
fillImg.color = new Color(0.4f, 0.9f, 0.4f, 1f);
|
||||
var fillRT = (RectTransform)fill.transform;
|
||||
fillRT.anchorMin = new Vector2(0, 0);
|
||||
fillRT.anchorMax = new Vector2(1, 1);
|
||||
fillRT.offsetMin = Vector2.zero;
|
||||
fillRT.offsetMax = Vector2.zero;
|
||||
|
||||
var handleArea = new GameObject("Handle Slide Area", typeof(RectTransform));
|
||||
handleArea.transform.SetParent(go.transform, false);
|
||||
var haRT = (RectTransform)handleArea.transform;
|
||||
haRT.anchorMin = new Vector2(0, 0);
|
||||
haRT.anchorMax = new Vector2(1, 1);
|
||||
haRT.offsetMin = Vector2.zero;
|
||||
haRT.offsetMax = Vector2.zero;
|
||||
|
||||
var handle = new GameObject("Handle", typeof(RectTransform), typeof(Image));
|
||||
handle.transform.SetParent(handleArea.transform, false);
|
||||
var handleImg = handle.GetComponent<Image>();
|
||||
handleImg.color = new Color(0.8f, 1f, 0.8f, 1f);
|
||||
var hRT = (RectTransform)handle.transform;
|
||||
hRT.sizeDelta = new Vector2(16, 24);
|
||||
hRT.anchorMin = new Vector2(0.5f, 0.5f);
|
||||
hRT.anchorMax = new Vector2(0.5f, 0.5f);
|
||||
hRT.anchoredPosition = Vector2.zero;
|
||||
|
||||
slider.fillRect = fill.GetComponent<RectTransform>();
|
||||
slider.handleRect = handle.GetComponent<RectTransform>();
|
||||
slider.targetGraphic = handleImg;
|
||||
slider.direction = Slider.Direction.LeftToRight;
|
||||
|
||||
return go;
|
||||
}
|
||||
|
||||
internal static GameObject CreateLabeledSlider(Transform parent, string label, string name, float min, float max, float value)
|
||||
{
|
||||
var group = CreateVerticalGroup(parent, name + "_Group", 4, TextAnchor.UpperLeft, new RectOffset(0, 0, 0, 0));
|
||||
CreateText(group.transform, name + "_Label", label, 18, TextAnchor.MiddleLeft, Color.white, FontStyles.Normal);
|
||||
CreateSlider(group.transform, name, min, max, value);
|
||||
return group;
|
||||
}
|
||||
|
||||
internal static GameObject CreateToggle(Transform parent, string name, string labelText, bool initial)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(Toggle));
|
||||
go.transform.SetParent(parent, false);
|
||||
var bg = CreateImage(go.transform, "Background", new Color(0.2f, 0.2f, 0.2f));
|
||||
var check = CreateImage(bg.transform, "Checkmark", new Color(0.7f, 1f, 0.7f));
|
||||
var label = CreateText(go.transform, "Label", labelText, 18, TextAnchor.MiddleLeft, Color.white, FontStyles.Normal);
|
||||
var toggle = go.GetComponent<Toggle>();
|
||||
toggle.isOn = initial;
|
||||
toggle.graphic = check.GetComponent<Image>();
|
||||
toggle.targetGraphic = bg.GetComponent<Image>();
|
||||
var rt = (RectTransform)go.transform;
|
||||
rt.sizeDelta = new Vector2(600, 40);
|
||||
var bgRT = (RectTransform)bg.transform;
|
||||
bgRT.anchorMin = new Vector2(0, 0.5f);
|
||||
bgRT.anchorMax = new Vector2(0, 0.5f);
|
||||
bgRT.pivot = new Vector2(0, 0.5f);
|
||||
bgRT.sizeDelta = new Vector2(24, 24);
|
||||
var checkRT = (RectTransform)check.transform;
|
||||
checkRT.anchorMin = checkRT.anchorMax = new Vector2(0.5f, 0.5f);
|
||||
checkRT.sizeDelta = new Vector2(16, 16);
|
||||
var labelRT = (RectTransform)label.transform;
|
||||
labelRT.anchorMin = new Vector2(0, 0);
|
||||
labelRT.anchorMax = new Vector2(1, 1);
|
||||
labelRT.offsetMin = new Vector2(34, 0);
|
||||
labelRT.offsetMax = new Vector2(0, 0);
|
||||
return go;
|
||||
}
|
||||
|
||||
internal static GameObject CreateImage(Transform parent, string name, Color color)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(Image));
|
||||
go.transform.SetParent(parent, false);
|
||||
var img = go.GetComponent<Image>();
|
||||
img.color = color;
|
||||
return go;
|
||||
}
|
||||
|
||||
internal static void CreateSpacer(Transform parent, float height)
|
||||
{
|
||||
var spacer = new GameObject("Spacer", typeof(RectTransform));
|
||||
spacer.transform.SetParent(parent, false);
|
||||
var rt = (RectTransform)spacer.transform;
|
||||
rt.sizeDelta = new Vector2(0, height);
|
||||
}
|
||||
|
||||
internal static ScrollRect CreateScrollList(Transform parent, out Transform content, string scrollName, string viewportName, string contentName)
|
||||
{
|
||||
var scrollGO = new GameObject(scrollName, typeof(RectTransform), typeof(Image), typeof(ScrollRect));
|
||||
scrollGO.transform.SetParent(parent, false);
|
||||
var srt = (RectTransform)scrollGO.transform;
|
||||
srt.sizeDelta = new Vector2(0, 240);
|
||||
var img = scrollGO.GetComponent<Image>();
|
||||
img.color = new Color(0, 0, 0, 0.3f);
|
||||
var viewport = new GameObject(viewportName, typeof(RectTransform), typeof(Mask), typeof(Image));
|
||||
viewport.transform.SetParent(scrollGO.transform, false);
|
||||
var vImg = viewport.GetComponent<Image>();
|
||||
vImg.color = new Color(0, 0, 0, 0.1f);
|
||||
viewport.GetComponent<Mask>().showMaskGraphic = false;
|
||||
var vprt = (RectTransform)viewport.transform;
|
||||
vprt.anchorMin = new Vector2(0, 0);
|
||||
vprt.anchorMax = new Vector2(1, 1);
|
||||
vprt.offsetMin = Vector2.zero;
|
||||
vprt.offsetMax = Vector2.zero;
|
||||
var contentGO = new GameObject(contentName, typeof(RectTransform), typeof(VerticalLayoutGroup));
|
||||
contentGO.transform.SetParent(viewport.transform, false);
|
||||
var vlg = contentGO.GetComponent<VerticalLayoutGroup>();
|
||||
vlg.spacing = 8;
|
||||
vlg.childAlignment = TextAnchor.UpperLeft;
|
||||
vlg.childForceExpandWidth = true;
|
||||
var crt = (RectTransform)contentGO.transform;
|
||||
crt.anchorMin = new Vector2(0, 1);
|
||||
crt.anchorMax = new Vector2(1, 1);
|
||||
crt.pivot = new Vector2(0.5f, 1);
|
||||
crt.offsetMin = Vector2.zero;
|
||||
crt.offsetMax = Vector2.zero;
|
||||
var csf = contentGO.AddComponent<ContentSizeFitter>();
|
||||
csf.verticalFit = ContentSizeFitter.FitMode.PreferredSize;
|
||||
content = contentGO.transform;
|
||||
var scroll = scrollGO.GetComponent<ScrollRect>();
|
||||
scroll.viewport = (RectTransform)viewport.transform;
|
||||
scroll.content = (RectTransform)content;
|
||||
scroll.horizontal = false;
|
||||
scroll.vertical = true;
|
||||
return scroll;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
2
Editor/UGUIBuilderUtils.cs.meta
Normal file
2
Editor/UGUIBuilderUtils.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2af2a4c51891b754d82ab14274d8146d
|
||||
@@ -2,8 +2,6 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using TMPro;
|
||||
using System.Linq;
|
||||
|
||||
namespace MegaKoop.EditorTools
|
||||
{
|
||||
@@ -23,17 +21,92 @@ namespace MegaKoop.EditorTools
|
||||
canvas = canvasGO.GetComponent<Canvas>();
|
||||
if (canvas == null) canvas = canvasGO.AddComponent<Canvas>();
|
||||
canvas.renderMode = RenderMode.ScreenSpaceOverlay;
|
||||
canvas.sortingOrder = 100;
|
||||
var scaler = canvasGO.GetComponent<CanvasScaler>();
|
||||
if (scaler == null) scaler = canvasGO.AddComponent<CanvasScaler>();
|
||||
scaler.uiScaleMode = CanvasScaler.ScaleMode.ScaleWithScreenSize;
|
||||
scaler.referenceResolution = new Vector2(1920, 1080);
|
||||
scaler.matchWidthOrHeight = 0.5f;
|
||||
var raycaster = canvasGO.GetComponent<GraphicRaycaster>();
|
||||
if (raycaster == null) raycaster = canvasGO.AddComponent<GraphicRaycaster>();
|
||||
|
||||
// Ensure EventSystem exists
|
||||
if (Object.FindObjectOfType<UnityEngine.EventSystems.EventSystem>() == null)
|
||||
// Ensure/upgrade EventSystem based on available modules
|
||||
var existingES = Object.FindObjectOfType<UnityEngine.EventSystems.EventSystem>();
|
||||
var inputSystemModuleType = System.Type.GetType("UnityEngine.InputSystem.UI.InputSystemUIInputModule, Unity.InputSystem", false);
|
||||
bool wantIS = inputSystemModuleType != null;
|
||||
bool wantLegacy = !wantIS;
|
||||
|
||||
GameObject esGO = null;
|
||||
if (existingES == null)
|
||||
{
|
||||
var es = new GameObject("EventSystem", typeof(UnityEngine.EventSystems.EventSystem), typeof(UnityEngine.EventSystems.StandaloneInputModule));
|
||||
var es = new GameObject("EventSystem", typeof(UnityEngine.EventSystems.EventSystem));
|
||||
if (wantIS) es.AddComponent(inputSystemModuleType);
|
||||
if (wantLegacy) es.AddComponent<UnityEngine.EventSystems.StandaloneInputModule>();
|
||||
Undo.RegisterCreatedObjectUndo(es, "Create EventSystem");
|
||||
esGO = es;
|
||||
}
|
||||
else
|
||||
{
|
||||
esGO = existingES.gameObject;
|
||||
var sim = existingES.GetComponent<UnityEngine.EventSystems.StandaloneInputModule>();
|
||||
var ism = inputSystemModuleType != null ? existingES.GetComponent(inputSystemModuleType) : null;
|
||||
if (wantIS && ism == null) Undo.AddComponent(existingES.gameObject, inputSystemModuleType);
|
||||
if (wantLegacy && sim == null) Undo.AddComponent<UnityEngine.EventSystems.StandaloneInputModule>(existingES.gameObject);
|
||||
}
|
||||
|
||||
// Assign actionsAsset only if the picked InputActionAsset contains a "UI" action map
|
||||
bool assignedUIActions = false;
|
||||
if (wantIS && inputSystemModuleType != null && esGO != null)
|
||||
{
|
||||
var module = esGO.GetComponent(inputSystemModuleType);
|
||||
if (module != null)
|
||||
{
|
||||
var prop = inputSystemModuleType.GetProperty("actionsAsset");
|
||||
if (prop != null)
|
||||
{
|
||||
var current = prop.GetValue(module, null) as UnityEngine.Object;
|
||||
if (current == null)
|
||||
{
|
||||
var iaaType = System.Type.GetType("UnityEngine.InputSystem.InputActionAsset, Unity.InputSystem", false);
|
||||
string ChooseUIAsset()
|
||||
{
|
||||
var guids = AssetDatabase.FindAssets("t:InputActionAsset");
|
||||
foreach (var g in guids)
|
||||
{
|
||||
var path = AssetDatabase.GUIDToAssetPath(g);
|
||||
var asset = AssetDatabase.LoadAssetAtPath<UnityEngine.Object>(path);
|
||||
if (asset != null && iaaType != null && iaaType.IsInstanceOfType(asset))
|
||||
{
|
||||
var map = iaaType.GetMethod("FindActionMap", new[] { typeof(string), typeof(bool) })?.Invoke(asset, new object[] { "UI", true });
|
||||
if (map != null) return path;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
var best = ChooseUIAsset();
|
||||
if (!string.IsNullOrEmpty(best))
|
||||
{
|
||||
var asset = AssetDatabase.LoadAssetAtPath<UnityEngine.Object>(best);
|
||||
prop.SetValue(module, asset, null);
|
||||
var comp = module as Component; if (comp != null) EditorUtility.SetDirty(comp);
|
||||
assignedUIActions = true;
|
||||
}
|
||||
// else: leave null to let module use its default actions
|
||||
}
|
||||
else { assignedUIActions = true; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (esGO != null)
|
||||
{
|
||||
var hasSIM = esGO.GetComponent<UnityEngine.EventSystems.StandaloneInputModule>() != null;
|
||||
var hasIS = inputSystemModuleType != null && esGO.GetComponent(inputSystemModuleType) != null;
|
||||
if (hasIS && !assignedUIActions && !hasSIM)
|
||||
{
|
||||
Undo.AddComponent<UnityEngine.EventSystems.StandaloneInputModule>(esGO);
|
||||
}
|
||||
Debug.Log($"[UGUIMenuBuilder] EventSystem configured. InputSystem={(hasIS ? "ON" : "OFF")} (actions={(assignedUIActions ? "OK" : "none")}), Standalone={(hasSIM ? "ON" : "OFF")}");
|
||||
}
|
||||
|
||||
// Clean old generated panels if present to avoid duplicates
|
||||
@@ -49,134 +122,9 @@ namespace MegaKoop.EditorTools
|
||||
DestroyChildIfExists(canvas.transform, "Panel_Settings");
|
||||
DestroyChildIfExists(canvas.transform, "Panel_Lobby");
|
||||
|
||||
// Root panels
|
||||
var panelMain = CreatePanel(canvas.transform, "Panel_MainMenu", new Vector2(900, 800));
|
||||
var panelSettings = CreatePanel(canvas.transform, "Panel_Settings", new Vector2(900, 800));
|
||||
var panelLobby = CreatePanel(canvas.transform, "Panel_Lobby", new Vector2(1100, 820));
|
||||
panelSettings.SetActive(false);
|
||||
panelLobby.SetActive(false);
|
||||
|
||||
// Main Menu Content
|
||||
var mainContainer = CreateVerticalGroup(panelMain.transform, "Main_VLayout", 20, TextAnchor.MiddleCenter, new RectOffset(30, 30, 30, 30));
|
||||
CreateText(mainContainer.transform, "Text_Title", "MEGA KOOP", 70, TextAnchor.MiddleCenter, Color.white, FontStyles.Bold);
|
||||
CreateText(mainContainer.transform, "Text_Subtitle", "CO-OP ADVENTURE", 20, TextAnchor.MiddleCenter, new Color(0.8f,0.8f,0.8f), FontStyles.Normal);
|
||||
CreateSpacer(mainContainer.transform, 20);
|
||||
|
||||
CreateMenuButton(mainContainer.transform, "Button_Multiplayer", "MULTIPLAYER");
|
||||
CreateMenuButton(mainContainer.transform, "Button_Settings", "SETTINGS");
|
||||
CreateMenuButton(mainContainer.transform, "Button_Quit", "QUIT GAME", isDanger:true);
|
||||
|
||||
// Settings
|
||||
var settingsContainer = CreateVerticalGroup(panelSettings.transform, "Settings_VLayout", 16, TextAnchor.UpperCenter, new RectOffset(30,30,30,30));
|
||||
CreateText(settingsContainer.transform, "Text_SettingsTitle", "SETTINGS", 48, TextAnchor.MiddleCenter, Color.white, FontStyles.Bold);
|
||||
CreateSpacer(settingsContainer.transform, 10);
|
||||
|
||||
var gfxGroup = CreateVerticalGroup(settingsContainer.transform, "Graphics_Group", 10, TextAnchor.UpperLeft, new RectOffset(10,10,10,10));
|
||||
CreateText(gfxGroup.transform, "Text_Graphics", "Graphics", 24, TextAnchor.MiddleLeft, Color.white, FontStyles.Bold);
|
||||
CreateDropdown(gfxGroup.transform, "Dropdown_Quality", new string[]{"Low","Medium","High","Ultra"});
|
||||
CreateToggle(gfxGroup.transform, "Toggle_Fullscreen", "Fullscreen", true);
|
||||
CreateDropdown(gfxGroup.transform, "Dropdown_Resolution", new string[]{"1280x720","1920x1080","2560x1440","3840x2160"});
|
||||
|
||||
var settingsButtons = CreateHorizontalGroup(settingsContainer.transform, "Settings_Buttons", 10, TextAnchor.MiddleCenter, new RectOffset(0,0,0,0));
|
||||
CreateMenuButton(settingsButtons.transform, "Button_ApplySettings", "APPLY");
|
||||
CreateMenuButton(settingsButtons.transform, "Button_BackFromSettings", "BACK");
|
||||
|
||||
// Lobby
|
||||
var lobbyContainer = CreateVerticalGroup(panelLobby.transform, "Lobby_VLayout", 16, TextAnchor.UpperCenter, new RectOffset(24,24,24,24));
|
||||
var lobbyHeader = CreateHorizontalGroup(lobbyContainer.transform, "Lobby_Header", 10, TextAnchor.MiddleCenter, new RectOffset(0,0,0,10));
|
||||
CreateText(lobbyHeader.transform, "Text_LobbyTitle", "MULTIPLAYER LOBBY", 36, TextAnchor.MiddleLeft, new Color(0.7f,1f,0.7f), FontStyles.Bold);
|
||||
CreateText(lobbyHeader.transform, "Text_Status", "OFFLINE", 18, TextAnchor.MiddleRight, new Color(0.8f,0.8f,0.8f), FontStyles.Bold);
|
||||
|
||||
// Lobby code area
|
||||
var codeGroup = CreateVerticalGroup(lobbyContainer.transform, "Lobby_CodeGroup", 8, TextAnchor.MiddleCenter, new RectOffset(10,10,10,10));
|
||||
CreateText(codeGroup.transform, "Text_LobbyCodeLabel", "LOBBY CODE", 16, TextAnchor.MiddleCenter, new Color(0.8f,0.8f,0.8f), FontStyles.Bold);
|
||||
var codeRow = CreateHorizontalGroup(codeGroup.transform, "Lobby_CodeRow", 10, TextAnchor.MiddleCenter, new RectOffset(0,0,0,0));
|
||||
CreateText(codeRow.transform, "Text_LobbyCodeValue", "------", 44, TextAnchor.MiddleCenter, new Color(0.7f,1f,0.7f), FontStyles.Bold);
|
||||
CreateMenuButton(codeRow.transform, "Button_CopyCode", "COPY");
|
||||
CreateText(codeGroup.transform, "Text_LobbyCodeHint", "Share this code with friends to invite them", 12, TextAnchor.MiddleCenter, new Color(0.8f,0.8f,0.8f), FontStyles.Normal);
|
||||
|
||||
// Tabs
|
||||
var tabs = CreateHorizontalGroup(lobbyContainer.transform, "Lobby_Tabs", 0, TextAnchor.MiddleCenter, new RectOffset(0,0,0,0));
|
||||
CreateMenuButton(tabs.transform, "Button_HostTab", "HOST LOBBY");
|
||||
CreateMenuButton(tabs.transform, "Button_JoinTab", "JOIN LOBBY");
|
||||
|
||||
// Join content
|
||||
var joinGroup = CreateVerticalGroup(lobbyContainer.transform, "Group_Join", 10, TextAnchor.UpperCenter, new RectOffset(10,10,10,10));
|
||||
var joinRow = CreateHorizontalGroup(joinGroup.transform, "Join_Row", 10, TextAnchor.MiddleCenter, new RectOffset(0,0,0,0));
|
||||
CreateInputField(joinRow.transform, "Input_LobbyCode", "Enter 6-digit code...");
|
||||
CreateMenuButton(joinGroup.transform, "Button_Connect", "CONNECT");
|
||||
|
||||
// Host content
|
||||
var hostGroup = CreateVerticalGroup(lobbyContainer.transform, "Group_Host", 10, TextAnchor.UpperCenter, new RectOffset(10,10,10,10));
|
||||
CreateDropdown(hostGroup.transform, "Dropdown_MaxPlayers", new string[]{"2","3","4","8"});
|
||||
CreateToggle(hostGroup.transform, "Toggle_PublicLobby", "Public", true);
|
||||
CreateMenuButton(hostGroup.transform, "Button_CreateLobby", "CREATE LOBBY");
|
||||
|
||||
// Players list
|
||||
var playersHeader = CreateHorizontalGroup(lobbyContainer.transform, "Players_Header", 10, TextAnchor.MiddleLeft, new RectOffset(0,0,0,0));
|
||||
CreateText(playersHeader.transform, "Text_PlayersTitle", "PLAYERS", 20, TextAnchor.MiddleLeft, Color.white, FontStyles.Bold);
|
||||
CreateText(playersHeader.transform, "Text_PlayerCount", "0/4", 18, TextAnchor.MiddleRight, new Color(0.7f,1f,0.7f), FontStyles.Bold);
|
||||
|
||||
var scroll = CreateScrollList(lobbyContainer.transform, out var content, "Scroll_Players", "Viewport", "Content_PlayersList");
|
||||
var empty = CreateText(lobbyContainer.transform, "Empty_Players", "Waiting for players...", 16, TextAnchor.MiddleCenter, new Color(0.8f,0.8f,0.8f), FontStyles.Italic);
|
||||
|
||||
// Template for player entry
|
||||
var template = new GameObject("PlayerItemTemplate", typeof(RectTransform), typeof(HorizontalLayoutGroup));
|
||||
template.transform.SetParent(content, false);
|
||||
var hlg = template.GetComponent<HorizontalLayoutGroup>();
|
||||
hlg.childAlignment = TextAnchor.MiddleLeft; hlg.spacing = 12; hlg.childControlWidth = false; hlg.childForceExpandWidth = true;
|
||||
var avatar = CreateImage(template.transform, "Image_Avatar", new Color(0.3f,0.6f,0.3f));
|
||||
var name = CreateText(template.transform, "Text_PlayerName", "Player", 18, TextAnchor.MiddleLeft, Color.white, FontStyles.Bold);
|
||||
var status = CreateText(template.transform, "Text_PlayerStatus", "NOT READY", 14, TextAnchor.MiddleRight, new Color(0.8f,0.8f,0.8f), FontStyles.Bold);
|
||||
((RectTransform)avatar.transform).sizeDelta = new Vector2(40,40);
|
||||
template.SetActive(false);
|
||||
|
||||
// Host controls
|
||||
var hostControls = CreateHorizontalGroup(lobbyContainer.transform, "Host_Controls", 10, TextAnchor.MiddleCenter, new RectOffset(0,0,0,0));
|
||||
CreateMenuButton(hostControls.transform, "Button_InviteFriends", "INVITE FRIENDS");
|
||||
CreateMenuButton(hostControls.transform, "Button_KickSelected", "KICK SELECTED");
|
||||
|
||||
// Friends picker will be a modal overlay under Panel_Lobby (so it doesn't stretch main layout)
|
||||
var friendsOverlay = new GameObject("Panel_Friends", typeof(RectTransform), typeof(Image));
|
||||
friendsOverlay.transform.SetParent(panelLobby.transform, false);
|
||||
var ovRT = (RectTransform)friendsOverlay.transform; ovRT.anchorMin = new Vector2(0,0); ovRT.anchorMax = new Vector2(1,1); ovRT.offsetMin = Vector2.zero; ovRT.offsetMax = Vector2.zero;
|
||||
var ovImg = friendsOverlay.GetComponent<Image>(); ovImg.color = new Color(0,0,0,0.55f);
|
||||
friendsOverlay.SetActive(false);
|
||||
|
||||
// Transparent background button to close on backdrop click
|
||||
var closeBg = new GameObject("Button_CloseFriendsOverlay", typeof(RectTransform), typeof(Image), typeof(Button));
|
||||
closeBg.transform.SetParent(friendsOverlay.transform, false);
|
||||
var closeBgRT = (RectTransform)closeBg.transform; closeBgRT.anchorMin = new Vector2(0,0); closeBgRT.anchorMax = new Vector2(1,1); closeBgRT.offsetMin = Vector2.zero; closeBgRT.offsetMax = Vector2.zero;
|
||||
var closeBgImg = closeBg.GetComponent<Image>(); closeBgImg.color = new Color(0,0,0,0);
|
||||
|
||||
// Center modal window
|
||||
var friendsWindow = CreatePanel(friendsOverlay.transform, "Friends_Window", new Vector2(900, 420));
|
||||
var friendsV = CreateVerticalGroup(friendsWindow.transform, "Friends_VLayout", 8, TextAnchor.UpperCenter, new RectOffset(16,16,16,16));
|
||||
CreateText(friendsV.transform, "Text_FriendsTitle", "INVITE FRIENDS", 24, TextAnchor.MiddleCenter, Color.white, FontStyles.Bold);
|
||||
CreateText(friendsV.transform, "Text_FriendsHint", "Select a friend to send a Steam invite.", 12, TextAnchor.MiddleCenter, new Color(0.8f,0.8f,0.8f), FontStyles.Normal);
|
||||
var friendsScroll = CreateScrollList(friendsV.transform, out var friendsContent, "Scroll_Friends", "Viewport", "Content_FriendsList");
|
||||
// Make friends content a compact grid of icons
|
||||
var vlgFriends = friendsContent.GetComponent<VerticalLayoutGroup>();
|
||||
if (vlgFriends) Object.DestroyImmediate(vlgFriends);
|
||||
var gridFriends = friendsContent.gameObject.AddComponent<GridLayoutGroup>();
|
||||
gridFriends.cellSize = new Vector2(72, 72);
|
||||
gridFriends.spacing = new Vector2(10, 10);
|
||||
gridFriends.startAxis = GridLayoutGroup.Axis.Horizontal;
|
||||
var csfFriends = friendsContent.GetComponent<ContentSizeFitter>();
|
||||
if (csfFriends == null) csfFriends = friendsContent.gameObject.AddComponent<ContentSizeFitter>();
|
||||
csfFriends.verticalFit = ContentSizeFitter.FitMode.PreferredSize;
|
||||
CreateText(friendsV.transform, "Empty_Friends", "No friends found.", 14, TextAnchor.MiddleCenter, new Color(0.8f,0.8f,0.8f), FontStyles.Italic);
|
||||
var friendsFooter = CreateHorizontalGroup(friendsV.transform, "Friends_Footer", 8, TextAnchor.MiddleCenter, new RectOffset(0,0,0,0));
|
||||
CreateMenuButton(friendsFooter.transform, "Button_BackFromFriends", "BACK");
|
||||
|
||||
// Ready
|
||||
CreateMenuButton(lobbyContainer.transform, "Button_ToggleReady", "TOGGLE READY");
|
||||
|
||||
// Footer
|
||||
var footer = CreateHorizontalGroup(lobbyContainer.transform, "Lobby_Footer", 10, TextAnchor.MiddleCenter, new RectOffset(0,0,0,0));
|
||||
CreateMenuButton(footer.transform, "Button_StartGame", "START GAME");
|
||||
CreateMenuButton(footer.transform, "Button_LeaveLobby", "LEAVE LOBBY");
|
||||
CreateMenuButton(footer.transform, "Button_BackFromLobby", "BACK TO MENU");
|
||||
var mainPanel = new MainMenuPanelBuilder(canvas.transform).Build();
|
||||
var settingsPanel = new SettingsPanelBuilder(canvas.transform).Build();
|
||||
var lobbyPanel = new LobbyPanelBuilder(canvas.transform).Build();
|
||||
|
||||
// Controllers
|
||||
var mainCtrl = canvas.gameObject.GetComponent<MegaKoop.UI.UGUIMainMenuController>();
|
||||
@@ -185,238 +133,13 @@ namespace MegaKoop.EditorTools
|
||||
if (lobbyCtrl == null) lobbyCtrl = canvas.gameObject.AddComponent<MegaKoop.UI.UGUIMultiplayerLobbyController>();
|
||||
|
||||
// Inject panel references for reliability
|
||||
mainCtrl.SetPanels(panelMain, panelSettings, panelLobby);
|
||||
lobbyCtrl.SetLobbyRoot(panelLobby);
|
||||
mainCtrl.SetPanels(mainPanel, settingsPanel, lobbyPanel);
|
||||
lobbyCtrl.SetLobbyRoot(lobbyPanel);
|
||||
|
||||
Selection.activeGameObject = canvas.gameObject;
|
||||
|
||||
Debug.Log("[UGUIMenuBuilder] UGUI Main Menu generated successfully. You can press Play and test.");
|
||||
}
|
||||
|
||||
private static GameObject CreatePanel(Transform parent, string name, Vector2 size)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(Image));
|
||||
go.transform.SetParent(parent, false);
|
||||
var rt = (RectTransform)go.transform;
|
||||
rt.anchorMin = rt.anchorMax = new Vector2(0.5f, 0.5f);
|
||||
rt.pivot = new Vector2(0.5f, 0.5f);
|
||||
rt.sizeDelta = size;
|
||||
var img = go.GetComponent<Image>();
|
||||
img.color = new Color(0.13f, 0.13f, 0.13f, 0.95f);
|
||||
return go;
|
||||
}
|
||||
|
||||
private static GameObject CreateVerticalGroup(Transform parent, string name, float spacing, TextAnchor align, RectOffset padding)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(VerticalLayoutGroup), typeof(ContentSizeFitter));
|
||||
go.transform.SetParent(parent, false);
|
||||
var rt = (RectTransform)go.transform;
|
||||
rt.anchorMin = new Vector2(0, 0); rt.anchorMax = new Vector2(1, 1); rt.offsetMin = new Vector2(0,0); rt.offsetMax = new Vector2(0,0);
|
||||
var vlg = go.GetComponent<VerticalLayoutGroup>();
|
||||
vlg.spacing = spacing; vlg.childAlignment = align; vlg.padding = padding; vlg.childForceExpandWidth = true; vlg.childControlWidth = true; vlg.childControlHeight = false;
|
||||
var fitter = go.GetComponent<ContentSizeFitter>();
|
||||
fitter.verticalFit = ContentSizeFitter.FitMode.PreferredSize; fitter.horizontalFit = ContentSizeFitter.FitMode.Unconstrained;
|
||||
return go;
|
||||
}
|
||||
|
||||
private static GameObject CreateHorizontalGroup(Transform parent, string name, float spacing, TextAnchor align, RectOffset padding)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(HorizontalLayoutGroup));
|
||||
go.transform.SetParent(parent, false);
|
||||
var rt = (RectTransform)go.transform;
|
||||
rt.anchorMin = new Vector2(0, 0); rt.anchorMax = new Vector2(1, 0); rt.pivot = new Vector2(0.5f, 0.5f);
|
||||
rt.sizeDelta = new Vector2(0, 60);
|
||||
var hlg = go.GetComponent<HorizontalLayoutGroup>();
|
||||
hlg.spacing = spacing; hlg.childAlignment = align; hlg.padding = padding; hlg.childControlWidth = true; hlg.childForceExpandWidth = true;
|
||||
return go;
|
||||
}
|
||||
|
||||
private static GameObject CreateText(Transform parent, string name, string text, int fontSize, TextAnchor anchor, Color color, FontStyles fontStyle)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(TextMeshProUGUI), typeof(LayoutElement));
|
||||
go.transform.SetParent(parent, false);
|
||||
var t = go.GetComponent<TextMeshProUGUI>();
|
||||
t.text = text; t.fontSize = fontSize; t.color = color; t.alignment = MapAlignment(anchor); t.fontStyle = fontStyle;
|
||||
t.enableWordWrapping = false; // avoid vertical letters
|
||||
t.raycastTarget = false; // don't block parent UI clicks
|
||||
if (TMP_Settings.defaultFontAsset != null) t.font = TMP_Settings.defaultFontAsset;
|
||||
var le = go.GetComponent<LayoutElement>();
|
||||
le.minHeight = Mathf.Max(24, fontSize + 12);
|
||||
var rt = (RectTransform)go.transform; rt.sizeDelta = new Vector2(0, fontSize + 20);
|
||||
return go;
|
||||
}
|
||||
|
||||
private static TextAlignmentOptions MapAlignment(TextAnchor anchor)
|
||||
{
|
||||
switch (anchor)
|
||||
{
|
||||
case TextAnchor.UpperLeft: return TextAlignmentOptions.TopLeft;
|
||||
case TextAnchor.UpperCenter: return TextAlignmentOptions.Top;
|
||||
case TextAnchor.UpperRight: return TextAlignmentOptions.TopRight;
|
||||
case TextAnchor.MiddleLeft: return TextAlignmentOptions.MidlineLeft;
|
||||
case TextAnchor.MiddleCenter: return TextAlignmentOptions.Midline;
|
||||
case TextAnchor.MiddleRight: return TextAlignmentOptions.MidlineRight;
|
||||
case TextAnchor.LowerLeft: return TextAlignmentOptions.BottomLeft;
|
||||
case TextAnchor.LowerCenter: return TextAlignmentOptions.Bottom;
|
||||
case TextAnchor.LowerRight: return TextAlignmentOptions.BottomRight;
|
||||
default: return TextAlignmentOptions.Center;
|
||||
}
|
||||
}
|
||||
|
||||
private static GameObject CreateMenuButton(Transform parent, string name, string label, bool isDanger = false)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(Image), typeof(Button));
|
||||
go.transform.SetParent(parent, false);
|
||||
var img = go.GetComponent<Image>();
|
||||
img.color = isDanger ? new Color(0.5f, 0.15f, 0.15f, 0.9f) : new Color(0.25f, 0.5f, 0.25f, 0.9f);
|
||||
var rt = (RectTransform)go.transform; rt.sizeDelta = new Vector2(0, 48);
|
||||
var leBtn = go.AddComponent<LayoutElement>();
|
||||
leBtn.flexibleWidth = 1; leBtn.minHeight = 48;
|
||||
var text = CreateText(go.transform, "Text", label, 20, TextAnchor.MiddleCenter, Color.white, FontStyles.Bold);
|
||||
var textRT = (RectTransform)text.transform; textRT.anchorMin = new Vector2(0,0); textRT.anchorMax = new Vector2(1,1); textRT.offsetMin = Vector2.zero; textRT.offsetMax = Vector2.zero;
|
||||
return go;
|
||||
}
|
||||
|
||||
private static GameObject CreateInputField(Transform parent, string name, string placeholder)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(Image), typeof(TMP_InputField));
|
||||
go.transform.SetParent(parent, false);
|
||||
var img = go.GetComponent<Image>(); img.color = new Color(0.1f,0.1f,0.1f,0.9f);
|
||||
var rt = (RectTransform)go.transform; rt.sizeDelta = new Vector2(600, 50);
|
||||
var viewport = new GameObject("TextViewport", typeof(RectTransform)); viewport.transform.SetParent(go.transform, false);
|
||||
var viewportRT = (RectTransform)viewport.transform; viewportRT.anchorMin = new Vector2(0,0); viewportRT.anchorMax = new Vector2(1,1); viewportRT.offsetMin = new Vector2(10,6); viewportRT.offsetMax = new Vector2(-10,-6);
|
||||
var text = CreateText(viewport.transform, "Text", string.Empty, 20, TextAnchor.MiddleLeft, Color.white, FontStyles.Normal);
|
||||
var placeholderGO = CreateText(viewport.transform, "Placeholder", placeholder, 18, TextAnchor.MiddleLeft, new Color(0.7f,0.7f,0.7f), FontStyles.Italic);
|
||||
var input = go.GetComponent<TMP_InputField>();
|
||||
input.textViewport = viewportRT;
|
||||
input.textComponent = text.GetComponent<TextMeshProUGUI>();
|
||||
input.placeholder = placeholderGO.GetComponent<TextMeshProUGUI>();
|
||||
var tRT = (RectTransform)text.transform; tRT.anchorMin = new Vector2(0,0); tRT.anchorMax = new Vector2(1,1); tRT.offsetMin = new Vector2(10,0); tRT.offsetMax = new Vector2(-10,0);
|
||||
var pRT = (RectTransform)placeholderGO.transform; pRT.anchorMin = new Vector2(0,0); pRT.anchorMax = new Vector2(1,1); pRT.offsetMin = new Vector2(10,0); pRT.offsetMax = new Vector2(-10,0);
|
||||
return go;
|
||||
}
|
||||
|
||||
private static GameObject CreateDropdown(Transform parent, string name, string[] options)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(Image), typeof(TMP_Dropdown));
|
||||
go.transform.SetParent(parent, false);
|
||||
var img = go.GetComponent<Image>(); img.color = new Color(0.2f,0.2f,0.2f,0.9f);
|
||||
var rt = (RectTransform)go.transform; rt.sizeDelta = new Vector2(600, 50);
|
||||
|
||||
// Caption label
|
||||
var caption = CreateText(go.transform, "Label", options.FirstOrDefault() ?? "Option", 18, TextAnchor.MiddleLeft, Color.white, FontStyles.Normal);
|
||||
var arrow = CreateText(go.transform, "Arrow", "▼", 18, TextAnchor.MiddleRight, Color.white, FontStyles.Bold);
|
||||
|
||||
// Template (disabled by default)
|
||||
var template = new GameObject("Template", typeof(RectTransform), typeof(Image), typeof(ScrollRect));
|
||||
template.transform.SetParent(go.transform, false);
|
||||
var templateRT = (RectTransform)template.transform;
|
||||
templateRT.anchorMin = new Vector2(0, 0); templateRT.anchorMax = new Vector2(1, 0); templateRT.pivot = new Vector2(0.5f, 1);
|
||||
templateRT.sizeDelta = new Vector2(0, 220); // visible dropdown height
|
||||
template.SetActive(false);
|
||||
var templateImg = template.GetComponent<Image>(); templateImg.color = new Color(0.1f,0.1f,0.1f,0.95f);
|
||||
|
||||
// Viewport
|
||||
var viewport = new GameObject("Viewport", typeof(RectTransform), typeof(Mask), typeof(Image));
|
||||
viewport.transform.SetParent(template.transform, false);
|
||||
var viewportRT = (RectTransform)viewport.transform; viewportRT.anchorMin = new Vector2(0,0); viewportRT.anchorMax = new Vector2(1,1); viewportRT.offsetMin = Vector2.zero; viewportRT.offsetMax = Vector2.zero;
|
||||
var vImg = viewport.GetComponent<Image>(); vImg.color = new Color(0,0,0,0.2f);
|
||||
viewport.GetComponent<Mask>().showMaskGraphic = false;
|
||||
|
||||
// Scroll content
|
||||
var content = new GameObject("Content", typeof(RectTransform), typeof(VerticalLayoutGroup));
|
||||
content.transform.SetParent(viewport.transform, false);
|
||||
var contentRT = (RectTransform)content.transform; contentRT.anchorMin = new Vector2(0,1); contentRT.anchorMax = new Vector2(1,1); contentRT.pivot = new Vector2(0.5f,1);
|
||||
var vlg = content.GetComponent<VerticalLayoutGroup>(); vlg.spacing = 4; vlg.childForceExpandWidth = true; vlg.childControlHeight = true;
|
||||
|
||||
// Item (Toggle)
|
||||
var item = new GameObject("Item", typeof(RectTransform), typeof(Toggle));
|
||||
item.transform.SetParent(content.transform, false);
|
||||
var itemRT = (RectTransform)item.transform; itemRT.sizeDelta = new Vector2(0, 30);
|
||||
var itemBG = new GameObject("Item Background", typeof(RectTransform), typeof(Image));
|
||||
itemBG.transform.SetParent(item.transform, false);
|
||||
var itemBGImg = itemBG.GetComponent<Image>(); itemBGImg.color = new Color(0.2f,0.2f,0.2f,0.9f);
|
||||
var itemCheck = new GameObject("Item Checkmark", typeof(RectTransform), typeof(Image));
|
||||
itemCheck.transform.SetParent(itemBG.transform, false);
|
||||
var itemCheckImg = itemCheck.GetComponent<Image>(); itemCheckImg.color = new Color(0.7f,1f,0.7f,1f);
|
||||
var itemLabelGO = CreateText(item.transform, "Item Label", "Option", 18, TextAnchor.MiddleLeft, Color.white, FontStyles.Normal);
|
||||
|
||||
// Position sub-elements
|
||||
var bgRT = (RectTransform)itemBG.transform; bgRT.anchorMin = new Vector2(0,0); bgRT.anchorMax = new Vector2(1,1); bgRT.offsetMin = Vector2.zero; bgRT.offsetMax = Vector2.zero;
|
||||
var ckRT = (RectTransform)itemCheck.transform; ckRT.anchorMin = new Vector2(0,0.5f); ckRT.anchorMax = new Vector2(0,0.5f); ckRT.pivot = new Vector2(0,0.5f); ckRT.sizeDelta = new Vector2(18,18); ckRT.anchoredPosition = new Vector2(6,0);
|
||||
var itemLabelRT = (RectTransform)itemLabelGO.transform; itemLabelRT.anchorMin = new Vector2(0,0); itemLabelRT.anchorMax = new Vector2(1,1); itemLabelRT.offsetMin = new Vector2(28,0); itemLabelRT.offsetMax = new Vector2(-6,0);
|
||||
|
||||
// Toggle wiring
|
||||
var tgl = item.GetComponent<Toggle>();
|
||||
tgl.targetGraphic = itemBGImg; tgl.graphic = itemCheckImg;
|
||||
|
||||
// Dropdown wiring
|
||||
var dd = go.GetComponent<TMP_Dropdown>();
|
||||
dd.template = template.GetComponent<RectTransform>();
|
||||
dd.captionText = caption.GetComponent<TextMeshProUGUI>();
|
||||
dd.itemText = itemLabelGO.GetComponent<TextMeshProUGUI>();
|
||||
dd.options = options.Select(o => new TMP_Dropdown.OptionData(o)).ToList();
|
||||
dd.RefreshShownValue();
|
||||
|
||||
// ScrollRect wiring
|
||||
var scr = template.GetComponent<ScrollRect>();
|
||||
scr.viewport = viewport.GetComponent<RectTransform>();
|
||||
scr.content = content.GetComponent<RectTransform>();
|
||||
scr.horizontal = false; scr.vertical = true;
|
||||
return go;
|
||||
}
|
||||
|
||||
private static GameObject CreateToggle(Transform parent, string name, string labelText, bool initial)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(Toggle));
|
||||
go.transform.SetParent(parent, false);
|
||||
var bg = CreateImage(go.transform, "Background", new Color(0.2f,0.2f,0.2f));
|
||||
var check = CreateImage(bg.transform, "Checkmark", new Color(0.7f,1f,0.7f));
|
||||
var label = CreateText(go.transform, "Label", labelText, 18, TextAnchor.MiddleLeft, Color.white, FontStyles.Normal);
|
||||
var t = go.GetComponent<Toggle>();
|
||||
t.isOn = initial; t.graphic = check.GetComponent<Image>(); t.targetGraphic = bg.GetComponent<Image>();
|
||||
var rt = (RectTransform)go.transform; rt.sizeDelta = new Vector2(600, 40);
|
||||
var bgRT = (RectTransform)bg.transform; bgRT.anchorMin = new Vector2(0,0.5f); bgRT.anchorMax = new Vector2(0,0.5f); bgRT.pivot = new Vector2(0,0.5f); bgRT.sizeDelta = new Vector2(24,24);
|
||||
var checkRT = (RectTransform)check.transform; checkRT.anchorMin = checkRT.anchorMax = new Vector2(0.5f,0.5f); checkRT.sizeDelta = new Vector2(16,16);
|
||||
var labelRT = (RectTransform)label.transform; labelRT.anchorMin = new Vector2(0,0); labelRT.anchorMax = new Vector2(1,1); labelRT.offsetMin = new Vector2(34,0); labelRT.offsetMax = new Vector2(0,0);
|
||||
return go;
|
||||
}
|
||||
|
||||
private static GameObject CreateImage(Transform parent, string name, Color color)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(Image));
|
||||
go.transform.SetParent(parent, false);
|
||||
var img = go.GetComponent<Image>(); img.color = color;
|
||||
return go;
|
||||
}
|
||||
|
||||
private static void CreateSpacer(Transform parent, float height)
|
||||
{
|
||||
var sp = new GameObject("Spacer", typeof(RectTransform));
|
||||
sp.transform.SetParent(parent, false);
|
||||
var rt = (RectTransform)sp.transform; rt.sizeDelta = new Vector2(0, height);
|
||||
}
|
||||
|
||||
private static ScrollRect CreateScrollList(Transform parent, out Transform content, string scrollName, string viewportName, string contentName)
|
||||
{
|
||||
var scrollGO = new GameObject(scrollName, typeof(RectTransform), typeof(Image), typeof(ScrollRect));
|
||||
scrollGO.transform.SetParent(parent, false);
|
||||
var srt = (RectTransform)scrollGO.transform; srt.sizeDelta = new Vector2(0, 240);
|
||||
var img = scrollGO.GetComponent<Image>(); img.color = new Color(0,0,0,0.3f);
|
||||
var viewport = new GameObject(viewportName, typeof(RectTransform), typeof(Mask), typeof(Image));
|
||||
viewport.transform.SetParent(scrollGO.transform, false);
|
||||
var vImg = viewport.GetComponent<Image>(); vImg.color = new Color(0,0,0,0.1f);
|
||||
viewport.GetComponent<Mask>().showMaskGraphic = false;
|
||||
var vprt = (RectTransform)viewport.transform; vprt.anchorMin = new Vector2(0,0); vprt.anchorMax = new Vector2(1,1); vprt.offsetMin = Vector2.zero; vprt.offsetMax = Vector2.zero;
|
||||
var contentGO = new GameObject(contentName, typeof(RectTransform), typeof(VerticalLayoutGroup));
|
||||
contentGO.transform.SetParent(viewport.transform, false);
|
||||
var vlg = contentGO.GetComponent<VerticalLayoutGroup>(); vlg.spacing = 8; vlg.childAlignment = TextAnchor.UpperLeft; vlg.childForceExpandWidth = true;
|
||||
var crt = (RectTransform)contentGO.transform; crt.anchorMin = new Vector2(0,1); crt.anchorMax = new Vector2(1,1); crt.pivot = new Vector2(0.5f,1); crt.offsetMin = new Vector2(0,0); crt.offsetMax = new Vector2(0,0);
|
||||
var csf = contentGO.AddComponent<ContentSizeFitter>(); csf.verticalFit = ContentSizeFitter.FitMode.PreferredSize;
|
||||
content = contentGO.transform;
|
||||
var scroll = scrollGO.GetComponent<ScrollRect>(); scroll.viewport = (RectTransform)viewport.transform; scroll.content = (RectTransform)content; scroll.horizontal = false; scroll.vertical = true;
|
||||
return scroll;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
8
Game.meta
Normal file
8
Game.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3aa05ef999c0db8c9a37646187699217
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
32
Game/AGENTS.md
Normal file
32
Game/AGENTS.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Repository Guidelines
|
||||
|
||||
## Project Structure & Module Organization
|
||||
- Unity assets live under `Assets/Game/`; `Hero/`, `Enemy/`, and `Scenes/` store prefabs and scene content.
|
||||
- Gameplay code is in `Assets/Game/Scripts/`, grouped by domain: `ThirdPerson*` for locomotion, `Combat/` for health & damage, and `WeaponSystem/` for weapons, projectiles, and data assets.
|
||||
- Keep shared multiplayer logic in `Scripts/` so both host and clients load identical behaviours; place editor-only utilities under an `Editor/` folder to avoid runtime inclusion.
|
||||
|
||||
## Build, Test, and Development Commands
|
||||
- Open the project with the Unity Hub or run `unity -projectPath ./` from the repo root to launch the editor.
|
||||
- Generate a standalone build with `unity -projectPath ./ -buildTarget StandaloneWindows64 -executeMethod BuildScripts.BuildClient` (create the `BuildClient` method in an editor script if missing).
|
||||
- Use the Unity Test Runner (`Window > General > Test Runner`) and run both Edit Mode and Play Mode suites before merging gameplay changes.
|
||||
|
||||
## Coding Style & Naming Conventions
|
||||
- Follow standard C# conventions: PascalCase for classes, methods, and public members; camelCase for private fields; prefix serialized private fields with `[SerializeField]` and keep them private.
|
||||
- Organize namespaces under `MegaKoop.Game.<Feature>` to mirror the folder structure.
|
||||
- Prefer composition-friendly MonoBehaviours with explicit `SerializeField` dependencies; avoid singletons in gameplay code unless wrapped for network synchronisation.
|
||||
|
||||
## Testing Guidelines
|
||||
- Use Unity’s built-in NUnit framework for component tests; name files `<Feature>Tests.cs` and mirror the folder of the code under test.
|
||||
- Favour deterministic Play Mode tests that exercise Steamworks stubs or mock networking flows; document any non-deterministic behaviour in the test summary.
|
||||
- Aim for tests around new systems that affect combat sync, projectiles, or hero abilities so regressions are caught pre-merge.
|
||||
|
||||
## Commit & Pull Request Guidelines
|
||||
- Commit messages should be imperative and scoped (e.g., `Add projectile lifetime clamps`).
|
||||
- PRs must describe gameplay impact, list affected scenes/prefabs, and include replication steps for multiplayer behaviour.
|
||||
- Link to tracking tasks and attach editor or in-game screenshots/GIFs when modifying hero abilities, UI, or VFX.
|
||||
|
||||
## Multiplayer & Online Rules
|
||||
- Treat every feature as networked-first: verify authority flows, replication, and prediction before adding offline shortcuts.
|
||||
- Integrate Steamworks.NET for session management; keep wrappers in a dedicated networking layer so gameplay systems call high-level abstractions.
|
||||
- When adding hero abilities, ensure weapon firing, damage, and state changes trigger RPCs/events that work for host migration and client late-join scenarios.
|
||||
- Document any temp offline fallbacks and add TODOs to replace them with Steamworks-backed implementations.
|
||||
7
Game/AGENTS.md.meta
Normal file
7
Game/AGENTS.md.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 26880776f1200689dbc1be5c197a03c0
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
176
Game/ANIMATOR_SETUP.md
Normal file
176
Game/ANIMATOR_SETUP.md
Normal file
@@ -0,0 +1,176 @@
|
||||
# Third Person Animator Setup
|
||||
|
||||
## Přehled
|
||||
Animator systém je nyní plně integrován do `ThirdPersonCharacterController.cs` a má automatický generátor pro vytvoření Animator Controlleru z Kevin Iglesias animací.
|
||||
|
||||
## ⚠️ DŮLEŽITÉ - Pokud máte problémy s animacemi
|
||||
|
||||
Pokud animace pohybu trhají nebo jump animace nefungují:
|
||||
|
||||
1. **Smažte starý controller** (pokud jste ho už vytvořili)
|
||||
2. **Vytvořte nový controller** s opraveným kódem (viz níže)
|
||||
3. **Zkontrolujte Console** pro debug výpis všech nalezených animací
|
||||
|
||||
### Oprava provedena:
|
||||
- ✅ Opraveno načítání animací z FBX souborů
|
||||
- ✅ Opraveno použití skutečné rychlosti z CharacterController
|
||||
- ✅ Opraveny jump transitions (Begin → Fall → Land)
|
||||
- ✅ Přidán debug výpis pro kontrolu načtených animací
|
||||
|
||||
## Rychlý Start
|
||||
|
||||
### 1. Otevřete Auto Builder
|
||||
V Unity menu: **MegaKoop → Animator → Auto Build Controller**
|
||||
|
||||
### 2. Vygenerujte Controller
|
||||
- Okno automaticky najde všechny animace ve složce Kevin Iglesias
|
||||
- Klikněte **"Najít Animace"** (nebo se načtou automaticky)
|
||||
- **Zkontrolujte Console** - měli byste vidět "Načteno: [název animace] z [cesta]"
|
||||
- Vyberte GameObject s `ThirdPersonCharacterController` v Hierarchy
|
||||
- Zaškrtněte "Přiřadit na vybraný objekt"
|
||||
- Klikněte na **Vytvořit Animator Controller**
|
||||
|
||||
### 3. Zkontrolujte Console
|
||||
Měli byste vidět výpis všech načtených animací:
|
||||
```
|
||||
=== Vytváření Animator Controller ===
|
||||
Idle: HumanM@Idle01
|
||||
Walk Forward: HumanM@Walk01_Forward
|
||||
Walk Backward: HumanM@Walk01_Backward
|
||||
...
|
||||
Jump Begin: HumanM@Jump01 - Begin
|
||||
Jump Fall: HumanM@Fall01
|
||||
Jump Land: HumanM@Jump01 - Land
|
||||
```
|
||||
|
||||
### 4. Hotovo!
|
||||
Controller je vytvořen a přiřazen. Animace budou fungovat automaticky.
|
||||
|
||||
## Co je zahrnuto
|
||||
|
||||
### Stavy Animatoru:
|
||||
- **Idle** - Poklidový stav
|
||||
- **Move** - 2D Blend Tree pro pohyb všemi směry (Forward/Backward/Left/Right + diagonály)
|
||||
- **Crouch** - Dřep (stisknutím LeftControl)
|
||||
- **Jump Begin** - Začátek skoku
|
||||
- **Jump Fall** - Pád ve vzduchu
|
||||
- **Jump Land** - Dopad
|
||||
- **Death** - Smrt
|
||||
|
||||
### Parametry:
|
||||
- **MoveX** (float) - Lokální X pohyb
|
||||
- **MoveZ** (float) - Lokální Z pohyb
|
||||
- **Speed** (float) - Rychlost postavy
|
||||
- **IsGrounded** (bool) - Je na zemi
|
||||
- **IsCrouching** (bool) - Dřepí
|
||||
- **IsDead** (bool) - Je mrtvý
|
||||
- **Jump** (trigger) - Spustí skok
|
||||
|
||||
## Použití v kódu
|
||||
|
||||
### Nastavení smrti:
|
||||
```csharp
|
||||
var controller = GetComponent<ThirdPersonCharacterController>();
|
||||
controller.SetDead(true);
|
||||
```
|
||||
|
||||
### Změna crouch klávesy:
|
||||
V Inspectoru na `ThirdPersonCharacterController` změňte "Crouch Key".
|
||||
|
||||
## Nalezené animace
|
||||
|
||||
### Idle
|
||||
- `HumanM@Idle01.fbx`
|
||||
|
||||
### Walk (všechny směry)
|
||||
- `HumanM@Walk01_Forward.fbx`
|
||||
- `HumanM@Walk01_Backward.fbx`
|
||||
- `HumanM@Walk01_Left.fbx`
|
||||
- `HumanM@Walk01_Right.fbx`
|
||||
- `HumanM@Walk01_ForwardLeft.fbx`
|
||||
- `HumanM@Walk01_ForwardRight.fbx`
|
||||
- `HumanM@Walk01_BackwardLeft.fbx`
|
||||
- `HumanM@Walk01_BackwardRight.fbx`
|
||||
|
||||
### Crouch
|
||||
- `HumanM@Crouch01_Idle.fbx`
|
||||
|
||||
### Jump (3 fáze)
|
||||
- `HumanM@Jump01 - Begin.fbx`
|
||||
- `HumanM@Fall01.fbx`
|
||||
- `HumanM@Jump01 - Land.fbx`
|
||||
|
||||
### Death
|
||||
- `HumanM@Death01.fbx`
|
||||
|
||||
## Poznámky
|
||||
|
||||
- **Animator je přímo v ThirdPersonCharacterController** - není potřeba žádný driver
|
||||
- **Automatické hledání animací** - stačí kliknout na tlačítko
|
||||
- **Plná integrace** - funguje s existující movement logikou
|
||||
- **Skok má 3 fáze** - Begin → Fall → Land pro realistický skok
|
||||
- **2D Blend Movement** - plynulý přechod mezi všemi směry pohybu
|
||||
|
||||
## Řešení problémů
|
||||
|
||||
### Animace pohybu se zastaví po 1 sekundě
|
||||
✅ **OPRAVENO** - Použití `CharacterController.velocity` místo `planarVelocity`
|
||||
|
||||
**Co dělat:**
|
||||
1. Smažte starý Animator Controller asset
|
||||
2. Vytvořte nový controller přes Auto Builder
|
||||
3. Ujistěte se, že používáte aktuální verzi `ThirdPersonCharacterController.cs`
|
||||
|
||||
### Jump animace nefungují
|
||||
✅ **OPRAVENO** - Přidány správné 3 fáze skoku a transitions
|
||||
|
||||
**Co kontrolovat:**
|
||||
- V Animatoru musí být stavy: "Jump Begin", "Jump Fall", "Jump Land"
|
||||
- Transitions: Begin → Fall (exit time 0.8) → Land (when IsGrounded)
|
||||
- Zkontrolujte Console, že všechny 3 jump animace byly načteny
|
||||
|
||||
### Animace nejsou nalezeny
|
||||
**Příznaky:** V okně Auto Builder jsou prázdná pole nebo Console ukazuje "Nelze najít FBX"
|
||||
|
||||
**Řešení:**
|
||||
1. Zkontrolujte, že složka `Assets/Kevin Iglesias/Human Animations/Animations/Male` existuje
|
||||
2. Zkontrolujte, že FBX soubory jsou v této struktuře:
|
||||
- `Idles/HumanM@Idle01.fbx`
|
||||
- `Movement/Walk/HumanM@Walk01_Forward.fbx`
|
||||
- `Movement/Jump/HumanM@Jump01 - Begin.fbx`
|
||||
- atd.
|
||||
3. Klikněte na "Najít Animace" v Auto Builder okně
|
||||
|
||||
### Animace se nehrají vůbec
|
||||
**Řešení:**
|
||||
1. Vyberte GameObject v Hierarchy
|
||||
2. V Inspectoru zkontrolujte:
|
||||
- `Animator` komponenta existuje a má přiřazený Controller
|
||||
- `ThirdPersonCharacterController.animator` není null (mělo by být auto-přiřazeno)
|
||||
3. V Play mode otevřete Animator okno (Window → Animation → Animator)
|
||||
4. Sledujte, jestli se mění parametry (MoveX, MoveZ, Speed)
|
||||
|
||||
### Animace se hrají, ale postavy se netočí správně
|
||||
- Animace z Kevin Iglesias mohou mít Root Motion
|
||||
- Zkontrolujte FBX Import Settings:
|
||||
- Vyberte FBX soubor
|
||||
- V Inspectoru → Rig → Animation Type: Humanoid
|
||||
- Animation → Apply Root Motion (podle potřeby)
|
||||
|
||||
### Debug kroky
|
||||
1. **Otevřete Console** při vytváření controlleru - měli byste vidět:
|
||||
```
|
||||
Načteno: HumanM@Idle01 z Assets/Kevin Iglesias/.../Idle01.fbx
|
||||
Načteno: HumanM@Walk01_Forward z Assets/Kevin Iglesias/.../Walk01_Forward.fbx
|
||||
...
|
||||
```
|
||||
|
||||
2. **V Play mode sledujte Animator parametry:**
|
||||
- Vyberte objekt
|
||||
- Otevřete Animator okno
|
||||
- Sledujte hodnoty MoveX, MoveZ, Speed při pohybu (WASD)
|
||||
|
||||
3. **Zkontrolujte rychlost:**
|
||||
- V Inspectoru na `ThirdPersonCharacterController`
|
||||
- `Move Speed` by měla být > 0 (default 5)
|
||||
- `Animation Damping` by měla být malá (default 0.075)
|
||||
7
Game/ANIMATOR_SETUP.md.meta
Normal file
7
Game/ANIMATOR_SETUP.md.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7ad384a5d94dd4849b2bde59a61be2b4
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Game/Animations.meta
Normal file
8
Game/Animations.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a9db29af334d0c4faec39cfcb94d294
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
773
Game/Animations/HumanM.controller
Normal file
773
Game/Animations/HumanM.controller
Normal file
@@ -0,0 +1,773 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1102 &-8498935495016141866
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Move
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: -4781775403145456279}
|
||||
- {fileID: 8850178536444615697}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 2825293835707982962}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!206 &-8424935704365893109
|
||||
BlendTree:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: CrouchTree
|
||||
m_Childs:
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: 3094330708855449807, guid: 8bb16e2bf48f0ba498b4ee70d2518ae0, type: 3}
|
||||
m_Threshold: 0
|
||||
m_Position: {x: 0, y: 1}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: Blend
|
||||
m_Mirror: 0
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: 3094330708855449807, guid: c8513a8a84992304cbf5d83a50496982, type: 3}
|
||||
m_Threshold: 0.14285715
|
||||
m_Position: {x: 0, y: -1}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: Blend
|
||||
m_Mirror: 0
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: 3094330708855449807, guid: 9aaaba966ff19b94d85b861b188e3c7c, type: 3}
|
||||
m_Threshold: 0.2857143
|
||||
m_Position: {x: -1, y: 0}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: Blend
|
||||
m_Mirror: 0
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: 3094330708855449807, guid: a04e7617c7224c140bb54bc5efa749d8, type: 3}
|
||||
m_Threshold: 0.42857143
|
||||
m_Position: {x: 1, y: 0}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: Blend
|
||||
m_Mirror: 0
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: 3094330708855449807, guid: c80bcd4bbb8f34b4295d0bbf504f9d14, type: 3}
|
||||
m_Threshold: 0.5714286
|
||||
m_Position: {x: -0.707, y: 0.707}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: Blend
|
||||
m_Mirror: 0
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: 3094330708855449807, guid: 1739295ae441ee2449c2966785bf080d, type: 3}
|
||||
m_Threshold: 0.71428573
|
||||
m_Position: {x: 0.707, y: 0.707}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: Blend
|
||||
m_Mirror: 0
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: 3094330708855449807, guid: 78b00c47efe6d994c9dd17dcdfb9f937, type: 3}
|
||||
m_Threshold: 0.85714287
|
||||
m_Position: {x: -0.707, y: -0.707}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: Blend
|
||||
m_Mirror: 0
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: 3094330708855449807, guid: d2383fa5c874d6c47ba9641ed23c0f9b, type: 3}
|
||||
m_Threshold: 1
|
||||
m_Position: {x: 0.707, y: -0.707}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: Blend
|
||||
m_Mirror: 0
|
||||
m_BlendParameter: MoveX
|
||||
m_BlendParameterY: MoveY
|
||||
m_MinThreshold: 0
|
||||
m_MaxThreshold: 1
|
||||
m_UseAutomaticThresholds: 1
|
||||
m_NormalizedBlendValues: 0
|
||||
m_BlendType: 2
|
||||
--- !u!1101 &-6651448720518132220
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 2
|
||||
m_ConditionEvent: IsCrouching
|
||||
m_EventTreshold: 0
|
||||
- m_ConditionMode: 3
|
||||
m_ConditionEvent: Speed
|
||||
m_EventTreshold: 0.1
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -8498935495016141866}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1102 &-5610313386011628649
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Die
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 3094330708855449807, guid: fbf1938c2eaa52a46b465cf5cb6768e6, type: 3}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &-4952808120312174995
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: JumpBegin
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: -1493415361259481946}
|
||||
- {fileID: 312786165673304762}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 3094330708855449807, guid: b1844fbe628f5bf4ab29e6c68912a708, type: 3}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1101 &-4781775403145456279
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 4
|
||||
m_ConditionEvent: Speed
|
||||
m_EventTreshold: 0.1
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 2828396430913159249}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &-2470093999796400837
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: IsGrounded
|
||||
m_EventTreshold: 0
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: Jump
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -4952808120312174995}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.02
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 0
|
||||
--- !u!1101 &-1493415361259481946
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: IsFalling
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 8130476550729524520}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.05
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!91 &9100000
|
||||
AnimatorController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: HumanM
|
||||
serializedVersion: 5
|
||||
m_AnimatorParameters:
|
||||
- m_Name: MoveX
|
||||
m_Type: 1
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: MoveY
|
||||
m_Type: 1
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: Speed
|
||||
m_Type: 1
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: IsGrounded
|
||||
m_Type: 4
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: IsCrouching
|
||||
m_Type: 4
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: Jump
|
||||
m_Type: 9
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: Die
|
||||
m_Type: 9
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: IsFalling
|
||||
m_Type: 4
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
m_StateMachine: {fileID: 6902866215468604435}
|
||||
m_Mask: {fileID: 0}
|
||||
m_Motions: []
|
||||
m_Behaviours: []
|
||||
m_BlendingMode: 0
|
||||
m_SyncedLayerIndex: -1
|
||||
m_DefaultWeight: 0
|
||||
m_IKPass: 0
|
||||
m_SyncedLayerAffectsTiming: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
--- !u!1101 &312786165673304762
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions: []
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 8130476550729524520}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &1581134310927100116
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions: []
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 2828396430913159249}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.05
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &2023964638505838094
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: Die
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -5610313386011628649}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!206 &2825293835707982962
|
||||
BlendTree:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: MoveTree
|
||||
m_Childs:
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: 3094330708855449807, guid: 6deac83e30d8acd4cbb8c7d8a11545bd, type: 3}
|
||||
m_Threshold: 0
|
||||
m_Position: {x: 0, y: 1}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: Blend
|
||||
m_Mirror: 0
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: 3094330708855449807, guid: a8e6c7cf678a13541a726c2ae9ec00e3, type: 3}
|
||||
m_Threshold: 0.14285715
|
||||
m_Position: {x: 0, y: -1}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: Blend
|
||||
m_Mirror: 0
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: 3094330708855449807, guid: 9f9dbe8815370164d8a2214328af4f13, type: 3}
|
||||
m_Threshold: 0.2857143
|
||||
m_Position: {x: -1, y: 0}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: Blend
|
||||
m_Mirror: 0
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: 3094330708855449807, guid: 846fff649819bcf49b933d00ef6f703f, type: 3}
|
||||
m_Threshold: 0.42857143
|
||||
m_Position: {x: 1, y: 0}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: Blend
|
||||
m_Mirror: 0
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: 3094330708855449807, guid: 2d491dc6ab8cc5045919954fe2601203, type: 3}
|
||||
m_Threshold: 0.5714286
|
||||
m_Position: {x: -0.707, y: 0.707}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: Blend
|
||||
m_Mirror: 0
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: 3094330708855449807, guid: 152af2cd00aaae34e816ebb8deb4b68e, type: 3}
|
||||
m_Threshold: 0.71428573
|
||||
m_Position: {x: 0.707, y: 0.707}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: Blend
|
||||
m_Mirror: 0
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: 3094330708855449807, guid: 02fe127be7c987640bef36b78efaf2cf, type: 3}
|
||||
m_Threshold: 0.85714287
|
||||
m_Position: {x: -0.707, y: -0.707}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: Blend
|
||||
m_Mirror: 0
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: 3094330708855449807, guid: ca7bf50d255ff5749a3a9ff602076af8, type: 3}
|
||||
m_Threshold: 1
|
||||
m_Position: {x: 0.707, y: -0.707}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: Blend
|
||||
m_Mirror: 0
|
||||
m_BlendParameter: MoveX
|
||||
m_BlendParameterY: MoveY
|
||||
m_MinThreshold: 0
|
||||
m_MaxThreshold: 1
|
||||
m_UseAutomaticThresholds: 1
|
||||
m_NormalizedBlendValues: 0
|
||||
m_BlendType: 2
|
||||
--- !u!1102 &2828396430913159249
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Idle
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 8944780679689797325}
|
||||
- {fileID: 5723977862795017248}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: -2576967968662016515, guid: 56fd86b76fc74d24d83522069f5deb9b, type: 3}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1101 &3940675542928111531
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: IsGrounded
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 7753169543815885552}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1102 &4785738724227979027
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Crouch
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 6263248612010160671}
|
||||
- {fileID: -6651448720518132220}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: -8424935704365893109}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1101 &5723977862795017248
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: IsCrouching
|
||||
m_EventTreshold: 0
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: IsGrounded
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 4785738724227979027}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &6263248612010160671
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 2
|
||||
m_ConditionEvent: IsCrouching
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 2828396430913159249}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1107 &6902866215468604435
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Base Layer
|
||||
m_ChildStates:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 2828396430913159249}
|
||||
m_Position: {x: 470, y: -50, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -8498935495016141866}
|
||||
m_Position: {x: 10, y: 400, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 4785738724227979027}
|
||||
m_Position: {x: 360, y: 400, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -4952808120312174995}
|
||||
m_Position: {x: 10, y: 310, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 8130476550729524520}
|
||||
m_Position: {x: 250, y: 310, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 7753169543815885552}
|
||||
m_Position: {x: 520, y: 330, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -5610313386011628649}
|
||||
m_Position: {x: -270, y: 100, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions:
|
||||
- {fileID: -2470093999796400837}
|
||||
- {fileID: 2023964638505838094}
|
||||
m_EntryTransitions: []
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
m_DefaultState: {fileID: 2828396430913159249}
|
||||
--- !u!1102 &7753169543815885552
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: JumpLand
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 1581134310927100116}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 3094330708855449807, guid: c969c57136eab8b48b882fdc45e975c4, type: 3}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &8130476550729524520
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: JumpFall
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 3940675542928111531}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 8908273484855622883, guid: 1455f282db7117d419994bb5c5f3acc2, type: 3}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1101 &8850178536444615697
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: IsCrouching
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 4785738724227979027}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &8944780679689797325
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 3
|
||||
m_ConditionEvent: Speed
|
||||
m_EventTreshold: 0.1
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: IsGrounded
|
||||
m_EventTreshold: 0
|
||||
- m_ConditionMode: 2
|
||||
m_ConditionEvent: IsCrouching
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -8498935495016141866}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
8
Game/Animations/HumanM.controller.meta
Normal file
8
Game/Animations/HumanM.controller.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0130b400909ef714a80f28c344f88f1d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Game/AnimatorControllers.meta
Normal file
8
Game/AnimatorControllers.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2801e9399643a1c40a1f31d8a31c5fb7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
875
Game/AnimatorControllers/KevinIglesias_Animator.controller
Normal file
875
Game/AnimatorControllers/KevinIglesias_Animator.controller
Normal file
@@ -0,0 +1,875 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1101 &-9223099930910222944
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 3
|
||||
m_ConditionEvent: MoveX
|
||||
m_EventTreshold: 0.1
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 3832306803502314366}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &-8532517125171013088
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 3
|
||||
m_ConditionEvent: MoveY
|
||||
m_EventTreshold: 0.1
|
||||
- m_ConditionMode: 3
|
||||
m_ConditionEvent: MoveX
|
||||
m_EventTreshold: -0.5
|
||||
- m_ConditionMode: 4
|
||||
m_ConditionEvent: MoveX
|
||||
m_EventTreshold: 0.5
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 8976783716086687100}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &-7598184442945806257
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 4
|
||||
m_ConditionEvent: MoveY
|
||||
m_EventTreshold: -0.1
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 7273822655190391941}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1102 &-5613363637968929658
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Crouch
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 4793052910455504006}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 5615237629708574395, guid: e39f1f951d4bf1b4192e2b9843ddeac0, type: 3}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1101 &-4733973239875750970
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 4
|
||||
m_ConditionEvent: MoveX
|
||||
m_EventTreshold: -0.1
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 3991497513609260727}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1107 &-3339399623978585728
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Base Layer
|
||||
m_ChildStates:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 9180075961849181553}
|
||||
m_Position: {x: 280, y: 0, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 8976783716086687100}
|
||||
m_Position: {x: 610, y: 10, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 7273822655190391941}
|
||||
m_Position: {x: 320, y: 140, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 3991497513609260727}
|
||||
m_Position: {x: 520, y: 260, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 3832306803502314366}
|
||||
m_Position: {x: 230, y: 250, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -5613363637968929658}
|
||||
m_Position: {x: 620, y: 330, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 4338801518624474264}
|
||||
m_Position: {x: 190, y: 380, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -1033068699299765464}
|
||||
m_Position: {x: -130, y: 310, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions:
|
||||
- {fileID: -1744180146228335812}
|
||||
m_EntryTransitions: []
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
m_DefaultState: {fileID: 9180075961849181553}
|
||||
--- !u!1101 &-1744180146228335812
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: IsDead
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -1033068699299765464}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 0
|
||||
--- !u!1102 &-1033068699299765464
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Death
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 3094330708855449807, guid: 7760eb562ddb5444b8d0e43f7c2192df, type: 3}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!91 &9100000
|
||||
AnimatorController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: KevinIglesias_Animator
|
||||
serializedVersion: 5
|
||||
m_AnimatorParameters:
|
||||
- m_Name: MoveX
|
||||
m_Type: 1
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: MoveY
|
||||
m_Type: 1
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: IsCrouching
|
||||
m_Type: 4
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: IsJumping
|
||||
m_Type: 4
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: IsDead
|
||||
m_Type: 4
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
m_StateMachine: {fileID: -3339399623978585728}
|
||||
m_Mask: {fileID: 0}
|
||||
m_Motions: []
|
||||
m_Behaviours: []
|
||||
m_BlendingMode: 0
|
||||
m_SyncedLayerIndex: -1
|
||||
m_DefaultWeight: 0
|
||||
m_IKPass: 0
|
||||
m_SyncedLayerAffectsTiming: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
--- !u!1101 &127254228791712997
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 4
|
||||
m_ConditionEvent: MoveY
|
||||
m_EventTreshold: -0.1
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 7273822655190391941}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &589304064454404889
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 3
|
||||
m_ConditionEvent: MoveY
|
||||
m_EventTreshold: 0.1
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 8976783716086687100}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &1284069681199553331
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 4
|
||||
m_ConditionEvent: MoveX
|
||||
m_EventTreshold: 0.1
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 9180075961849181553}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &1312605581613424915
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 4
|
||||
m_ConditionEvent: MoveX
|
||||
m_EventTreshold: -0.1
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 3991497513609260727}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &2277284908929358149
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 3
|
||||
m_ConditionEvent: MoveY
|
||||
m_EventTreshold: 0.1
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 8976783716086687100}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &2972984080605431098
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 4
|
||||
m_ConditionEvent: MoveY
|
||||
m_EventTreshold: 0.1
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 9180075961849181553}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &3251282714847043942
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 3
|
||||
m_ConditionEvent: MoveX
|
||||
m_EventTreshold: 0.1
|
||||
- m_ConditionMode: 3
|
||||
m_ConditionEvent: MoveY
|
||||
m_EventTreshold: -0.5
|
||||
- m_ConditionMode: 4
|
||||
m_ConditionEvent: MoveY
|
||||
m_EventTreshold: 0.5
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 3832306803502314366}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &3746686181836934452
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 3
|
||||
m_ConditionEvent: MoveX
|
||||
m_EventTreshold: 0.1
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 3832306803502314366}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &3796912113966575383
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 4
|
||||
m_ConditionEvent: MoveY
|
||||
m_EventTreshold: -0.1
|
||||
- m_ConditionMode: 3
|
||||
m_ConditionEvent: MoveX
|
||||
m_EventTreshold: -0.5
|
||||
- m_ConditionMode: 4
|
||||
m_ConditionEvent: MoveX
|
||||
m_EventTreshold: 0.5
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 7273822655190391941}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1102 &3832306803502314366
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Walk_Right
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 1284069681199553331}
|
||||
- {fileID: 2277284908929358149}
|
||||
- {fileID: 127254228791712997}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 3094330708855449807, guid: 04d25d986c5b3d14d95a5d3d2407bf88, type: 3}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1101 &3956464035334462522
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 2
|
||||
m_ConditionEvent: IsJumping
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 9180075961849181553}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1102 &3991497513609260727
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Walk_Left
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 6145983808295941987}
|
||||
- {fileID: 589304064454404889}
|
||||
- {fileID: -7598184442945806257}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 3094330708855449807, guid: 0b06d1311dfeb18428ccc1797869bda2, type: 3}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &4338801518624474264
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Jump
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 3956464035334462522}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 3094330708855449807, guid: abfd5440ec4350b46bdc9de604553b7a, type: 3}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1101 &4793052910455504006
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 2
|
||||
m_ConditionEvent: IsCrouching
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 9180075961849181553}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &6145983808295941987
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 3
|
||||
m_ConditionEvent: MoveX
|
||||
m_EventTreshold: -0.1
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 9180075961849181553}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1102 &7273822655190391941
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Walk_Backward
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 8649353525588907647}
|
||||
- {fileID: 1312605581613424915}
|
||||
- {fileID: 3746686181836934452}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 3094330708855449807, guid: fb96533b282f4bf4cb39e26ed7a456e5, type: 3}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1101 &7329264976501435579
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 4
|
||||
m_ConditionEvent: MoveX
|
||||
m_EventTreshold: -0.1
|
||||
- m_ConditionMode: 3
|
||||
m_ConditionEvent: MoveY
|
||||
m_EventTreshold: -0.5
|
||||
- m_ConditionMode: 4
|
||||
m_ConditionEvent: MoveY
|
||||
m_EventTreshold: 0.5
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 3991497513609260727}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &7976597507551637200
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: IsCrouching
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -5613363637968929658}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &8011782933078922766
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: IsJumping
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 4338801518624474264}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &8649353525588907647
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 3
|
||||
m_ConditionEvent: MoveY
|
||||
m_EventTreshold: -0.1
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 9180075961849181553}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1102 &8976783716086687100
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Walk_Forward
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 2972984080605431098}
|
||||
- {fileID: -4733973239875750970}
|
||||
- {fileID: -9223099930910222944}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 3094330708855449807, guid: fb96533b282f4bf4cb39e26ed7a456e5, type: 3}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &9180075961849181553
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Idle
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: -8532517125171013088}
|
||||
- {fileID: 3796912113966575383}
|
||||
- {fileID: 7329264976501435579}
|
||||
- {fileID: 3251282714847043942}
|
||||
- {fileID: 7976597507551637200}
|
||||
- {fileID: 8011782933078922766}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 3094330708855449807, guid: c163a36c98396ee4488ff914e337cf3c, type: 3}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f2edbb32292840240b9ba89a593dcd3b
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
20
Game/BossSchedule.asset
Normal file
20
Game/BossSchedule.asset
Normal file
@@ -0,0 +1,20 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2e2ad306ddab577d19b1e0e6bbb6fea9, type: 3}
|
||||
m_Name: BossSchedule
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Game.Scripts.Runtime.Data.BossSchedule
|
||||
events:
|
||||
- TimeSinceStart: 30
|
||||
Boss: {fileID: 11400000, guid: 931549bcc3a079d30b302ebd17d6ebd4, type: 2}
|
||||
Count: 1
|
||||
useSpawnRadiusOverride: 0
|
||||
spawnRadiusOverride: 0
|
||||
8
Game/BossSchedule.asset.meta
Normal file
8
Game/BossSchedule.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 319a0c9985048d82a988921e699fc6c6
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Game/Editor.meta
Normal file
8
Game/Editor.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 35ff76358e6b54144896c9c6c58ad66c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
387
Game/Editor/AutoAnimatorControllerBuilder.cs
Normal file
387
Game/Editor/AutoAnimatorControllerBuilder.cs
Normal file
@@ -0,0 +1,387 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Animations;
|
||||
using UnityEngine;
|
||||
|
||||
namespace MegaKoop.Game.EditorExtensions
|
||||
{
|
||||
public class AutoAnimatorControllerBuilder : EditorWindow
|
||||
{
|
||||
private const string ANIM_BASE_PATH = "Assets/Kevin Iglesias/Human Animations/Animations/Male";
|
||||
private string controllerSavePath = "Assets/Game/ThirdPersonController.controller";
|
||||
private bool assignToSelected = true;
|
||||
|
||||
private AnimationClip idleClip;
|
||||
private AnimationClip walkForward, walkBackward, walkLeft, walkRight;
|
||||
private AnimationClip walkForwardLeft, walkForwardRight, walkBackwardLeft, walkBackwardRight;
|
||||
private AnimationClip crouchIdle;
|
||||
private AnimationClip jumpBegin, jumpFall, jumpLand;
|
||||
private AnimationClip deathClip;
|
||||
|
||||
[MenuItem("MegaKoop/Animator/Auto Build Controller")]
|
||||
public static void ShowWindow()
|
||||
{
|
||||
var window = GetWindow<AutoAnimatorControllerBuilder>(true, "Auto Animator Builder");
|
||||
window.minSize = new Vector2(500, 650);
|
||||
window.Show();
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
AutoDiscoverAnimations();
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
EditorGUILayout.LabelField("Automatický Animator Controller Builder", EditorStyles.boldLabel);
|
||||
EditorGUILayout.Space(6);
|
||||
|
||||
EditorGUILayout.HelpBox(
|
||||
"Tento nástroj automaticky najde animace ve složce Kevin Iglesias a vytvoří kompletní Animator Controller.\n" +
|
||||
"Stiskněte 'Najít Animace' pro aktualizaci nebo 'Vytvořit Controller' pro vygenerování.",
|
||||
MessageType.Info);
|
||||
|
||||
EditorGUILayout.Space(8);
|
||||
|
||||
if (GUILayout.Button("Najít Animace", GUILayout.Height(30)))
|
||||
{
|
||||
AutoDiscoverAnimations();
|
||||
}
|
||||
|
||||
EditorGUILayout.Space(8);
|
||||
EditorGUILayout.LabelField("Nalezené Animace:", EditorStyles.boldLabel);
|
||||
|
||||
DrawClipField("Idle", idleClip);
|
||||
DrawClipField("Walk Forward", walkForward);
|
||||
DrawClipField("Walk Backward", walkBackward);
|
||||
DrawClipField("Walk Left", walkLeft);
|
||||
DrawClipField("Walk Right", walkRight);
|
||||
DrawClipField("Walk Forward Left", walkForwardLeft);
|
||||
DrawClipField("Walk Forward Right", walkForwardRight);
|
||||
DrawClipField("Walk Backward Left", walkBackwardLeft);
|
||||
DrawClipField("Walk Backward Right", walkBackwardRight);
|
||||
DrawClipField("Crouch Idle", crouchIdle);
|
||||
DrawClipField("Jump Begin", jumpBegin);
|
||||
DrawClipField("Jump Fall", jumpFall);
|
||||
DrawClipField("Jump Land", jumpLand);
|
||||
DrawClipField("Death", deathClip);
|
||||
|
||||
EditorGUILayout.Space(10);
|
||||
EditorGUILayout.LabelField("Nastavení:", EditorStyles.boldLabel);
|
||||
|
||||
assignToSelected = EditorGUILayout.Toggle("Přiřadit na vybraný objekt", assignToSelected);
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
controllerSavePath = EditorGUILayout.TextField("Cesta uložení", controllerSavePath);
|
||||
if (GUILayout.Button("...", GUILayout.Width(32)))
|
||||
{
|
||||
string path = EditorUtility.SaveFilePanelInProject(
|
||||
"Uložit Animator Controller",
|
||||
"ThirdPersonController",
|
||||
"controller",
|
||||
"Vyberte umístění pro Animator Controller");
|
||||
if (!string.IsNullOrEmpty(path)) controllerSavePath = path;
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.Space(12);
|
||||
|
||||
using (new EditorGUI.DisabledScope(!CanBuild()))
|
||||
{
|
||||
if (GUILayout.Button("Vytvořit Animator Controller", GUILayout.Height(40)))
|
||||
{
|
||||
BuildController();
|
||||
}
|
||||
}
|
||||
|
||||
if (!CanBuild())
|
||||
{
|
||||
EditorGUILayout.HelpBox("Pro vytvoření controlleru musí být nalezeny minimálně: Idle, Walk Forward/Backward/Left/Right, Jump Begin/Fall/Land.", MessageType.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawClipField(string label, AnimationClip clip)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField(label, GUILayout.Width(150));
|
||||
GUI.enabled = false;
|
||||
EditorGUILayout.ObjectField(clip, typeof(AnimationClip), false);
|
||||
GUI.enabled = true;
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
private void AutoDiscoverAnimations()
|
||||
{
|
||||
Debug.Log("Hledám animace v Kevin Iglesias složce...");
|
||||
|
||||
idleClip = LoadAnimationClip("Idles/HumanM@Idle01.fbx");
|
||||
|
||||
walkForward = LoadAnimationClip("Movement/Walk/HumanM@Walk01_Forward.fbx");
|
||||
walkBackward = LoadAnimationClip("Movement/Walk/HumanM@Walk01_Backward.fbx");
|
||||
walkLeft = LoadAnimationClip("Movement/Walk/HumanM@Walk01_Left.fbx");
|
||||
walkRight = LoadAnimationClip("Movement/Walk/HumanM@Walk01_Right.fbx");
|
||||
walkForwardLeft = LoadAnimationClip("Movement/Walk/HumanM@Walk01_ForwardLeft.fbx");
|
||||
walkForwardRight = LoadAnimationClip("Movement/Walk/HumanM@Walk01_ForwardRight.fbx");
|
||||
walkBackwardLeft = LoadAnimationClip("Movement/Walk/HumanM@Walk01_BackwardLeft.fbx");
|
||||
walkBackwardRight = LoadAnimationClip("Movement/Walk/HumanM@Walk01_BackwardRight.fbx");
|
||||
|
||||
crouchIdle = LoadAnimationClip("Movement/Crouch/HumanM@Crouch01_Idle.fbx");
|
||||
|
||||
jumpBegin = LoadAnimationClip("Movement/Jump/HumanM@Jump01 - Begin.fbx");
|
||||
jumpFall = LoadAnimationClip("Movement/Jump/HumanM@Fall01.fbx");
|
||||
jumpLand = LoadAnimationClip("Movement/Jump/HumanM@Jump01 - Land.fbx");
|
||||
|
||||
deathClip = LoadAnimationClip("Combat/HumanM@Death01.fbx");
|
||||
|
||||
Debug.Log("Hledání dokončeno.");
|
||||
Repaint();
|
||||
}
|
||||
|
||||
private AnimationClip LoadAnimationClip(string relativePath)
|
||||
{
|
||||
string fullPath = Path.Combine(ANIM_BASE_PATH, relativePath).Replace("\\", "/");
|
||||
|
||||
// Load all assets from the FBX file
|
||||
var assets = AssetDatabase.LoadAllAssetsAtPath(fullPath);
|
||||
if (assets == null || assets.Length == 0)
|
||||
{
|
||||
Debug.LogWarning($"Nelze najít assets v: {fullPath}");
|
||||
return null;
|
||||
}
|
||||
|
||||
// Find animation clips (excluding preview clips)
|
||||
var clips = new List<AnimationClip>();
|
||||
foreach (var asset in assets)
|
||||
{
|
||||
if (asset is AnimationClip clip && !clip.name.Contains("__preview__"))
|
||||
{
|
||||
clips.Add(clip);
|
||||
}
|
||||
}
|
||||
|
||||
if (clips.Count == 0)
|
||||
{
|
||||
Debug.LogWarning($"Žádné AnimationClip v: {fullPath}");
|
||||
return null;
|
||||
}
|
||||
|
||||
// Return the first valid clip
|
||||
var result = clips[0];
|
||||
Debug.Log($"Načteno: {result.name} z {fullPath}");
|
||||
return result;
|
||||
}
|
||||
|
||||
private bool CanBuild()
|
||||
{
|
||||
return idleClip != null &&
|
||||
walkForward != null && walkBackward != null && walkLeft != null && walkRight != null &&
|
||||
jumpBegin != null && jumpFall != null && jumpLand != null &&
|
||||
!string.IsNullOrEmpty(controllerSavePath);
|
||||
}
|
||||
|
||||
private void BuildController()
|
||||
{
|
||||
Debug.Log("=== Vytváření Animator Controller ===");
|
||||
Debug.Log($"Idle: {(idleClip != null ? idleClip.name : "CHYBÍ")}");
|
||||
Debug.Log($"Walk Forward: {(walkForward != null ? walkForward.name : "CHYBÍ")}");
|
||||
Debug.Log($"Walk Backward: {(walkBackward != null ? walkBackward.name : "CHYBÍ")}");
|
||||
Debug.Log($"Walk Left: {(walkLeft != null ? walkLeft.name : "CHYBÍ")}");
|
||||
Debug.Log($"Walk Right: {(walkRight != null ? walkRight.name : "CHYBÍ")}");
|
||||
Debug.Log($"Jump Begin: {(jumpBegin != null ? jumpBegin.name : "CHYBÍ")}");
|
||||
Debug.Log($"Jump Fall: {(jumpFall != null ? jumpFall.name : "CHYBÍ")}");
|
||||
Debug.Log($"Jump Land: {(jumpLand != null ? jumpLand.name : "CHYBÍ")}");
|
||||
|
||||
var controller = AnimatorController.CreateAnimatorControllerAtPath(controllerSavePath);
|
||||
AddParameters(controller);
|
||||
|
||||
var root = controller.layers[0].stateMachine;
|
||||
|
||||
// States
|
||||
var idle = root.AddState("Idle", new Vector3(250, 50, 0));
|
||||
idle.motion = idleClip;
|
||||
root.defaultState = idle;
|
||||
|
||||
var move = root.AddState("Move", new Vector3(250, 150, 0));
|
||||
move.motion = CreateMoveBlendTree(controller);
|
||||
move.speedParameterActive = true;
|
||||
move.speedParameter = "MoveSpeedNormalized";
|
||||
|
||||
AnimatorState crouch = null;
|
||||
if (crouchIdle != null)
|
||||
{
|
||||
crouch = root.AddState("Crouch", new Vector3(250, 250, 0));
|
||||
crouch.motion = crouchIdle;
|
||||
}
|
||||
|
||||
var jumpBeginState = root.AddState("Jump Begin", new Vector3(500, 50, 0));
|
||||
jumpBeginState.motion = jumpBegin;
|
||||
|
||||
var jumpFallState = root.AddState("Jump Fall", new Vector3(500, 150, 0));
|
||||
jumpFallState.motion = jumpFall;
|
||||
|
||||
var jumpLandState = root.AddState("Jump Land", new Vector3(500, 250, 0));
|
||||
jumpLandState.motion = jumpLand;
|
||||
|
||||
AnimatorState death = null;
|
||||
if (deathClip != null)
|
||||
{
|
||||
death = root.AddState("Death", new Vector3(250, 350, 0));
|
||||
death.motion = deathClip;
|
||||
}
|
||||
|
||||
// Transitions: Idle <-> Move
|
||||
var idleToMove = idle.AddTransition(move);
|
||||
idleToMove.hasExitTime = false;
|
||||
idleToMove.duration = 0.1f;
|
||||
idleToMove.AddCondition(AnimatorConditionMode.Greater, 0.1f, "Speed");
|
||||
|
||||
var moveToIdle = move.AddTransition(idle);
|
||||
moveToIdle.hasExitTime = false;
|
||||
moveToIdle.duration = 0.1f;
|
||||
moveToIdle.AddCondition(AnimatorConditionMode.Less, 0.1f, "Speed");
|
||||
|
||||
// Crouch transitions
|
||||
if (crouch != null)
|
||||
{
|
||||
var anyToCrouch = root.AddAnyStateTransition(crouch);
|
||||
anyToCrouch.hasExitTime = false;
|
||||
anyToCrouch.duration = 0.1f;
|
||||
anyToCrouch.AddCondition(AnimatorConditionMode.If, 0f, "IsCrouching");
|
||||
|
||||
var crouchToIdle = crouch.AddTransition(idle);
|
||||
crouchToIdle.hasExitTime = false;
|
||||
crouchToIdle.duration = 0.1f;
|
||||
crouchToIdle.AddCondition(AnimatorConditionMode.IfNot, 0f, "IsCrouching");
|
||||
crouchToIdle.AddCondition(AnimatorConditionMode.Less, 0.1f, "Speed");
|
||||
|
||||
var crouchToMove = crouch.AddTransition(move);
|
||||
crouchToMove.hasExitTime = false;
|
||||
crouchToMove.duration = 0.1f;
|
||||
crouchToMove.AddCondition(AnimatorConditionMode.IfNot, 0f, "IsCrouching");
|
||||
crouchToMove.AddCondition(AnimatorConditionMode.Greater, 0.1f, "Speed");
|
||||
}
|
||||
|
||||
// Jump transitions: AnyState -> Jump Begin
|
||||
// Jump transitions from grounded states
|
||||
var idleToJump = idle.AddTransition(jumpBeginState);
|
||||
idleToJump.hasExitTime = false;
|
||||
idleToJump.duration = 0.05f;
|
||||
idleToJump.AddCondition(AnimatorConditionMode.If, 0f, "IsJumping");
|
||||
idleToJump.AddCondition(AnimatorConditionMode.IfNot, 0f, "IsGrounded");
|
||||
|
||||
var moveToJump = move.AddTransition(jumpBeginState);
|
||||
moveToJump.hasExitTime = false;
|
||||
moveToJump.duration = 0.05f;
|
||||
moveToJump.AddCondition(AnimatorConditionMode.If, 0f, "IsJumping");
|
||||
moveToJump.AddCondition(AnimatorConditionMode.IfNot, 0f, "IsGrounded");
|
||||
|
||||
if (crouch != null)
|
||||
{
|
||||
var crouchToJump = crouch.AddTransition(jumpBeginState);
|
||||
crouchToJump.hasExitTime = false;
|
||||
crouchToJump.duration = 0.05f;
|
||||
crouchToJump.AddCondition(AnimatorConditionMode.If, 0f, "IsJumping");
|
||||
crouchToJump.AddCondition(AnimatorConditionMode.IfNot, 0f, "IsGrounded");
|
||||
}
|
||||
|
||||
// Jump Begin -> Jump Fall (automatic after animation)
|
||||
var jumpBeginToFall = jumpBeginState.AddTransition(jumpFallState);
|
||||
jumpBeginToFall.hasExitTime = true;
|
||||
jumpBeginToFall.exitTime = 0.8f;
|
||||
jumpBeginToFall.duration = 0.05f;
|
||||
jumpBeginToFall.hasFixedDuration = true;
|
||||
|
||||
// Jump Fall -> Jump Land (when grounded)
|
||||
var jumpFallToLand = jumpFallState.AddTransition(jumpLandState);
|
||||
jumpFallToLand.hasExitTime = false;
|
||||
jumpFallToLand.duration = 0.05f;
|
||||
jumpFallToLand.hasFixedDuration = true;
|
||||
jumpFallToLand.AddCondition(AnimatorConditionMode.If, 0f, "IsGrounded");
|
||||
|
||||
// Jump Land -> Idle (exit time)
|
||||
var jumpLandToIdle = jumpLandState.AddTransition(idle);
|
||||
jumpLandToIdle.hasExitTime = true;
|
||||
jumpLandToIdle.exitTime = 0.7f;
|
||||
jumpLandToIdle.duration = 0.1f;
|
||||
jumpLandToIdle.hasFixedDuration = true;
|
||||
jumpLandToIdle.AddCondition(AnimatorConditionMode.Less, 0.1f, "Speed");
|
||||
|
||||
// Jump Land -> Move (exit time)
|
||||
var jumpLandToMove = jumpLandState.AddTransition(move);
|
||||
jumpLandToMove.hasExitTime = true;
|
||||
jumpLandToMove.exitTime = 0.7f;
|
||||
jumpLandToMove.duration = 0.1f;
|
||||
jumpLandToMove.hasFixedDuration = true;
|
||||
jumpLandToMove.AddCondition(AnimatorConditionMode.Greater, 0.1f, "Speed");
|
||||
|
||||
// Death
|
||||
if (death != null)
|
||||
{
|
||||
var anyToDeath = root.AddAnyStateTransition(death);
|
||||
anyToDeath.hasExitTime = false;
|
||||
anyToDeath.duration = 0.2f;
|
||||
anyToDeath.AddCondition(AnimatorConditionMode.If, 0f, "IsDead");
|
||||
}
|
||||
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
Debug.Log($"Animator Controller vytvořen: {controllerSavePath}");
|
||||
|
||||
if (assignToSelected && Selection.activeGameObject != null)
|
||||
{
|
||||
var go = Selection.activeGameObject;
|
||||
var anim = go.GetComponent<Animator>();
|
||||
if (anim == null) anim = go.AddComponent<Animator>();
|
||||
anim.runtimeAnimatorController = controller;
|
||||
|
||||
Debug.Log($"Controller přiřazen na: {go.name}");
|
||||
}
|
||||
|
||||
EditorGUIUtility.PingObject(controller);
|
||||
}
|
||||
|
||||
private void AddParameters(AnimatorController controller)
|
||||
{
|
||||
controller.AddParameter("MoveX", AnimatorControllerParameterType.Float);
|
||||
controller.AddParameter("MoveZ", AnimatorControllerParameterType.Float);
|
||||
controller.AddParameter("Speed", AnimatorControllerParameterType.Float);
|
||||
controller.AddParameter("MoveSpeedNormalized", AnimatorControllerParameterType.Float);
|
||||
controller.AddParameter("IsGrounded", AnimatorControllerParameterType.Bool);
|
||||
controller.AddParameter("IsCrouching", AnimatorControllerParameterType.Bool);
|
||||
controller.AddParameter("IsDead", AnimatorControllerParameterType.Bool);
|
||||
controller.AddParameter("IsJumping", AnimatorControllerParameterType.Bool);
|
||||
}
|
||||
|
||||
private Motion CreateMoveBlendTree(AnimatorController controller)
|
||||
{
|
||||
var tree = new BlendTree
|
||||
{
|
||||
name = "MoveTree",
|
||||
blendType = BlendTreeType.FreeformCartesian2D,
|
||||
useAutomaticThresholds = false,
|
||||
blendParameter = "MoveX",
|
||||
blendParameterY = "MoveZ"
|
||||
};
|
||||
|
||||
AssetDatabase.AddObjectToAsset(tree, controller);
|
||||
|
||||
var children = new List<ChildMotion>();
|
||||
|
||||
if (walkForward != null) children.Add(new ChildMotion { motion = walkForward, position = new Vector2(0f, 1f), timeScale = 1f });
|
||||
if (walkBackward != null) children.Add(new ChildMotion { motion = walkBackward, position = new Vector2(0f, -1f), timeScale = 1f });
|
||||
if (walkLeft != null) children.Add(new ChildMotion { motion = walkLeft, position = new Vector2(-1f, 0f), timeScale = 1f });
|
||||
if (walkRight != null) children.Add(new ChildMotion { motion = walkRight, position = new Vector2(1f, 0f), timeScale = 1f });
|
||||
|
||||
if (walkForwardLeft != null) children.Add(new ChildMotion { motion = walkForwardLeft, position = new Vector2(-0.707f, 0.707f), timeScale = 1f });
|
||||
if (walkForwardRight != null) children.Add(new ChildMotion { motion = walkForwardRight, position = new Vector2(0.707f, 0.707f), timeScale = 1f });
|
||||
if (walkBackwardLeft != null) children.Add(new ChildMotion { motion = walkBackwardLeft, position = new Vector2(-0.707f, -0.707f), timeScale = 1f });
|
||||
if (walkBackwardRight != null) children.Add(new ChildMotion { motion = walkBackwardRight, position = new Vector2(0.707f, -0.707f), timeScale = 1f });
|
||||
|
||||
tree.children = children.ToArray();
|
||||
return tree;
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Game/Editor/AutoAnimatorControllerBuilder.cs.meta
Normal file
2
Game/Editor/AutoAnimatorControllerBuilder.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1b37cd72d6f4eda48b10c9637d641c6f
|
||||
8
Game/Enemy.meta
Normal file
8
Game/Enemy.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f250f7f11c39195b2a38e7f052154182
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Game/Enemy/Butcher.meta
Normal file
8
Game/Enemy/Butcher.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 48c9e67a0c0c948489f927fd1c27b2fa
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
3522
Game/Enemy/Butcher/Butcher.prefab
Normal file
3522
Game/Enemy/Butcher/Butcher.prefab
Normal file
File diff suppressed because it is too large
Load Diff
9
Game/Enemy/Butcher/Butcher.prefab.meta
Normal file
9
Game/Enemy/Butcher/Butcher.prefab.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d086cbb30c7bb4ba3a58cb2024fa0b31
|
||||
timeCreated: 1526423972
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
22
Game/Enemy/Butcher/ButcherDefinition.asset
Normal file
22
Game/Enemy/Butcher/ButcherDefinition.asset
Normal file
@@ -0,0 +1,22 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6b0e84710d3119d60af5d5373005e029, type: 3}
|
||||
m_Name: ButcherDefinition
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Game.Scripts.Runtime.Data.EnemyDefinition
|
||||
id: enemy_golem
|
||||
Prefab: {fileID: 1170732337855516, guid: d086cbb30c7bb4ba3a58cb2024fa0b31, type: 3}
|
||||
IsBoss: 1
|
||||
BaseHP: 300
|
||||
MoveSpeed: 6
|
||||
Damage: 10
|
||||
PrefabPivotOffset: {x: 0, y: 0, z: 0}
|
||||
Tags: []
|
||||
8
Game/Enemy/Butcher/ButcherDefinition.asset.meta
Normal file
8
Game/Enemy/Butcher/ButcherDefinition.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 931549bcc3a079d30b302ebd17d6ebd4
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Game/Enemy/Golem.meta
Normal file
8
Game/Enemy/Golem.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a9df8db4a9428a557a3f6f46b6652d79
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
3521
Game/Enemy/Golem/Golem.prefab
Normal file
3521
Game/Enemy/Golem/Golem.prefab
Normal file
File diff suppressed because it is too large
Load Diff
9
Game/Enemy/Golem/Golem.prefab.meta
Normal file
9
Game/Enemy/Golem/Golem.prefab.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b5051c49d05768c73a8c42e1967fe4b2
|
||||
timeCreated: 1526423972
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
22
Game/Enemy/Golem/GolemDefinition.asset
Normal file
22
Game/Enemy/Golem/GolemDefinition.asset
Normal file
@@ -0,0 +1,22 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6b0e84710d3119d60af5d5373005e029, type: 3}
|
||||
m_Name: GolemDefinition
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Game.Scripts.Runtime.Data.EnemyDefinition
|
||||
id: enemy_golem
|
||||
Prefab: {fileID: 1170732337855516, guid: b5051c49d05768c73a8c42e1967fe4b2, type: 3}
|
||||
IsBoss: 0
|
||||
BaseHP: 100
|
||||
MoveSpeed: 3.5
|
||||
Damage: 10
|
||||
PrefabPivotOffset: {x: 0, y: 0, z: 0}
|
||||
Tags: []
|
||||
8
Game/Enemy/Golem/GolemDefinition.asset.meta
Normal file
8
Game/Enemy/Golem/GolemDefinition.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1bc4888fa172eb99f94756653be6c1ed
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Game/Hero.meta
Normal file
8
Game/Hero.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: de06818812108c54f8cc6429c1370c05
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
29
Game/Hero/Champion_00.asset
Normal file
29
Game/Hero/Champion_00.asset
Normal file
@@ -0,0 +1,29 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1db1d1943f6165546b7a8aa42068f69b, type: 3}
|
||||
m_Name: Champion_00
|
||||
m_EditorClassIdentifier: Assembly-CSharp::MegaKoop.Champions.ChampionData
|
||||
championName: Champion 1
|
||||
championId: 0
|
||||
description: Popis pro Champion 1
|
||||
portrait: {fileID: 0}
|
||||
championPrefab: {fileID: 7059514996416789454, guid: fe75fe22781f92b369675fdfc9657f7d, type: 3}
|
||||
primaryGunName: Primary Weapon
|
||||
primaryGunDescription: Primary gun description
|
||||
secondaryGunName: Secondary Weapon
|
||||
secondaryGunDescription: Secondary gun description
|
||||
passiveName: Passive Ability
|
||||
passiveDescription: Passive ability description
|
||||
primaryGunIcon: {fileID: 0}
|
||||
secondaryGunIcon: {fileID: 0}
|
||||
passiveIcon: {fileID: 0}
|
||||
themeColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
8
Game/Hero/Champion_00.asset.meta
Normal file
8
Game/Hero/Champion_00.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e91e178970c9ce94fa1aae63627dd287
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
29
Game/Hero/Champion_01.asset
Normal file
29
Game/Hero/Champion_01.asset
Normal file
@@ -0,0 +1,29 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1db1d1943f6165546b7a8aa42068f69b, type: 3}
|
||||
m_Name: Champion_01
|
||||
m_EditorClassIdentifier: Assembly-CSharp::MegaKoop.Champions.ChampionData
|
||||
championName: Champion 2
|
||||
championId: 1
|
||||
description: Popis pro Champion 2
|
||||
portrait: {fileID: 0}
|
||||
championPrefab: {fileID: 2809934685114486836, guid: ae082cf2d3a36684fb23d8ec0e643150, type: 3}
|
||||
primaryGunName: Primary Weapon
|
||||
primaryGunDescription: Primary gun description
|
||||
secondaryGunName: Secondary Weapon
|
||||
secondaryGunDescription: Secondary gun description
|
||||
passiveName: Passive Ability
|
||||
passiveDescription: Passive ability description
|
||||
primaryGunIcon: {fileID: 0}
|
||||
secondaryGunIcon: {fileID: 0}
|
||||
passiveIcon: {fileID: 0}
|
||||
themeColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
8
Game/Hero/Champion_01.asset.meta
Normal file
8
Game/Hero/Champion_01.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3063583c11830974380a240794f2a205
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Game/Hero/Weapons.meta
Normal file
8
Game/Hero/Weapons.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cf250eac73dbba38d947df7a05910bc5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Game/Hero/Weapons/Staff.meta
Normal file
8
Game/Hero/Weapons/Staff.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2f55c0b12239df279b90e7e62c02f093
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
4847
Game/Hero/Weapons/Staff/Projectile_Fireball.prefab
Normal file
4847
Game/Hero/Weapons/Staff/Projectile_Fireball.prefab
Normal file
File diff suppressed because it is too large
Load Diff
9
Game/Hero/Weapons/Staff/Projectile_Fireball.prefab.meta
Normal file
9
Game/Hero/Weapons/Staff/Projectile_Fireball.prefab.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6703b124cb13a577c8aae6a4851d0274
|
||||
timeCreated: 1526434856
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
27
Game/Hero/Weapons/Staff/Staff.asset
Normal file
27
Game/Hero/Weapons/Staff/Staff.asset
Normal file
@@ -0,0 +1,27 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2fd5ff95d6e2be5d09b6c054570cef0a, type: 3}
|
||||
m_Name: Staff
|
||||
m_EditorClassIdentifier: Assembly-CSharp::MegaKoop.Game.WeaponSystem.WeaponDefinition
|
||||
displayName: Weapon
|
||||
viewPrefab: {fileID: 6595277065068154610, guid: 7eba33411273ad195adc8a8253711e93, type: 3}
|
||||
projectilePrefab: {fileID: -6920969466594260193, guid: 6703b124cb13a577c8aae6a4851d0274, type: 3}
|
||||
projectileSpeed: 15
|
||||
projectileLifetime: 5
|
||||
shotsPerSecond: 1
|
||||
baseDamage: 5
|
||||
range: 25
|
||||
projectilesPerShot: 2
|
||||
spreadAngle: 0
|
||||
hitMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 256
|
||||
8
Game/Hero/Weapons/Staff/Staff.asset.meta
Normal file
8
Game/Hero/Weapons/Staff/Staff.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 912de7c15ecf9d38d9be364bc0ac0f70
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
138
Game/Hero/Weapons/Staff/Staff.prefab
Normal file
138
Game/Hero/Weapons/Staff/Staff.prefab
Normal file
@@ -0,0 +1,138 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1515352688969276
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4447648817959868}
|
||||
- component: {fileID: 33814000495682932}
|
||||
- component: {fileID: 23588202079409966}
|
||||
- component: {fileID: 6595277065068154610}
|
||||
m_Layer: 0
|
||||
m_Name: Staff
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4447648817959868
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1515352688969276}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 2459495563451568810}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &33814000495682932
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1515352688969276}
|
||||
m_Mesh: {fileID: 4300000, guid: b5a701b2b15d1b8449e77534e99ea3ed, type: 3}
|
||||
--- !u!23 &23588202079409966
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1515352688969276}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: caf01dd5152f3934d8079e6160aa3b1e, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!114 &6595277065068154610
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1515352688969276}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5590d430717d95f878b7929af7bf28ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::MegaKoop.Game.WeaponSystem.WeaponView
|
||||
muzzles:
|
||||
- {fileID: 2459495563451568810}
|
||||
--- !u!1 &4268583630942894705
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2459495563451568810}
|
||||
m_Layer: 0
|
||||
m_Name: Muzzle
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &2459495563451568810
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4268583630942894705}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: 0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1.004, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4447648817959868}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
9
Game/Hero/Weapons/Staff/Staff.prefab.meta
Normal file
9
Game/Hero/Weapons/Staff/Staff.prefab.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7eba33411273ad195adc8a8253711e93
|
||||
timeCreated: 1526437063
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
2629
Game/Hero/Wizard 2.0.prefab
Normal file
2629
Game/Hero/Wizard 2.0.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
Game/Hero/Wizard 2.0.prefab.meta
Normal file
7
Game/Hero/Wizard 2.0.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ae082cf2d3a36684fb23d8ec0e643150
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
519
Game/Hero/Wizard.controller
Normal file
519
Game/Hero/Wizard.controller
Normal file
@@ -0,0 +1,519 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1102 &-5005458363344763551
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Die
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 1
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 3094330708855449807, guid: 7760eb562ddb5444b8d0e43f7c2192df, type: 3}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1101 &-4631355371241270487
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 3
|
||||
m_ConditionEvent: Speed
|
||||
m_EventTreshold: 0.1
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 3548663125465516573}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &-1429160152013153923
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: IsGrounded
|
||||
m_EventTreshold: 0
|
||||
- m_ConditionMode: 3
|
||||
m_ConditionEvent: Speed
|
||||
m_EventTreshold: 0.1
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 3548663125465516573}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.05
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!91 &9100000
|
||||
AnimatorController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Wizard
|
||||
serializedVersion: 5
|
||||
m_AnimatorParameters:
|
||||
- m_Name: MoveX
|
||||
m_Type: 1
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: MoveY
|
||||
m_Type: 1
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: Speed
|
||||
m_Type: 1
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: Crouch
|
||||
m_Type: 4
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: IsGrounded
|
||||
m_Type: 4
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: Jump
|
||||
m_Type: 9
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: Die
|
||||
m_Type: 9
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: VelocityX
|
||||
m_Type: 1
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: VelocityZ
|
||||
m_Type: 1
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
m_StateMachine: {fileID: 8242670736330881267}
|
||||
m_Mask: {fileID: 0}
|
||||
m_Motions: []
|
||||
m_Behaviours: []
|
||||
m_BlendingMode: 0
|
||||
m_SyncedLayerIndex: -1
|
||||
m_DefaultWeight: 0
|
||||
m_IKPass: 0
|
||||
m_SyncedLayerAffectsTiming: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
--- !u!1101 &116473636664755690
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: Crouch
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 4317488930648554223}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &1082025487737620517
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: IsGrounded
|
||||
m_EventTreshold: 0
|
||||
- m_ConditionMode: 4
|
||||
m_ConditionEvent: Speed
|
||||
m_EventTreshold: 0.1
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 2647644253287696677}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.05
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!206 &1416250122200667625
|
||||
BlendTree:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Locomotion1D
|
||||
m_Childs:
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: 3094330708855449807, guid: c163a36c98396ee4488ff914e337cf3c, type: 3}
|
||||
m_Threshold: 0
|
||||
m_Position: {x: 0, y: 0}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: Blend
|
||||
m_Mirror: 0
|
||||
- serializedVersion: 2
|
||||
m_Motion: {fileID: 3094330708855449807, guid: 0f2c87ca7a855df43a8828ca45b4ac7a, type: 3}
|
||||
m_Threshold: 1
|
||||
m_Position: {x: 0, y: 0}
|
||||
m_TimeScale: 1
|
||||
m_CycleOffset: 0
|
||||
m_DirectBlendParameter: Blend
|
||||
m_Mirror: 0
|
||||
m_BlendParameter: Speed
|
||||
m_BlendParameterY: Blend
|
||||
m_MinThreshold: 0
|
||||
m_MaxThreshold: 1
|
||||
m_UseAutomaticThresholds: 0
|
||||
m_NormalizedBlendValues: 0
|
||||
m_BlendType: 0
|
||||
--- !u!1101 &2139043373077119958
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: Die
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -5005458363344763551}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.05
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1102 &2647644253287696677
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Idle
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: -4631355371241270487}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 3094330708855449807, guid: c163a36c98396ee4488ff914e337cf3c, type: 3}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &2678168681401043168
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Jump
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 1082025487737620517}
|
||||
- {fileID: -1429160152013153923}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 3094330708855449807, guid: abfd5440ec4350b46bdc9de604553b7a, type: 3}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1101 &3415526489745367715
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 2
|
||||
m_ConditionEvent: Crouch
|
||||
m_EventTreshold: 0
|
||||
- m_ConditionMode: 3
|
||||
m_ConditionEvent: Speed
|
||||
m_EventTreshold: 0.1
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 3548663125465516573}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1102 &3548663125465516573
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Locomotion
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 6894626867432249349}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 1416250122200667625}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1101 &3662821069391527842
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 2
|
||||
m_ConditionEvent: Crouch
|
||||
m_EventTreshold: 0
|
||||
- m_ConditionMode: 4
|
||||
m_ConditionEvent: Speed
|
||||
m_EventTreshold: 0.1
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 2647644253287696677}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1102 &4317488930648554223
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Crouch
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 3662821069391527842}
|
||||
- {fileID: 3415526489745367715}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 5615237629708574395, guid: e39f1f951d4bf1b4192e2b9843ddeac0, type: 3}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1101 &6894626867432249349
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 4
|
||||
m_ConditionEvent: Speed
|
||||
m_EventTreshold: 0.1
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 2647644253287696677}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.1
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.9
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &7734956140975118551
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: Jump
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 2678168681401043168}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.05
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1107 &8242670736330881267
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Base Layer
|
||||
m_ChildStates:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 2647644253287696677}
|
||||
m_Position: {x: 150, y: 0, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 3548663125465516573}
|
||||
m_Position: {x: 160, y: 190, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 4317488930648554223}
|
||||
m_Position: {x: 530, y: 110, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 2678168681401043168}
|
||||
m_Position: {x: -90, y: 100, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -5005458363344763551}
|
||||
m_Position: {x: 580, y: 260, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions:
|
||||
- {fileID: 7734956140975118551}
|
||||
- {fileID: 116473636664755690}
|
||||
- {fileID: 2139043373077119958}
|
||||
m_EntryTransitions: []
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: 150, y: 320, z: 0}
|
||||
m_EntryPosition: {x: -80, y: -10, z: 0}
|
||||
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
m_DefaultState: {fileID: 2647644253287696677}
|
||||
8
Game/Hero/Wizard.controller.meta
Normal file
8
Game/Hero/Wizard.controller.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d9d32685621ce2d44afc1490f6452d8f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
2547
Game/Hero/Wizard.prefab
Normal file
2547
Game/Hero/Wizard.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
Game/Hero/Wizard.prefab.meta
Normal file
7
Game/Hero/Wizard.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fe75fe22781f92b369675fdfc9657f7d
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Game/Particles.meta
Normal file
8
Game/Particles.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 004c51472698a38d38ec44894ed2baa0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
2
Game/Particles/JMO Assets.meta
Normal file
2
Game/Particles/JMO Assets.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 976974e4d3018034e87caeb9f51f20f6
|
||||
Binary file not shown.
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b18b93d4b5d00384ba417df18aeac5a3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 109565
|
||||
packageName: Cartoon FX Remaster Free
|
||||
packageVersion: R 1.5.0
|
||||
assetPath: Assets/JMO Assets/Cartoon FX FREE (old legacy effects).unitypackage
|
||||
uploadId: 756876
|
||||
8
Game/Particles/JMO Assets/Cartoon FX Remaster.meta
Normal file
8
Game/Particles/JMO Assets/Cartoon FX Remaster.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b56551e9e3ab84e4180b7b30c06ff232
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bd9d1d014bf0b14428db03b2527d2d93
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a426d2ed10d55c47b7aee95ace55b60
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "CFXREditor",
|
||||
"references": [],
|
||||
"optionalUnityReferences": [],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": []
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eb5cb7c323a395242a81960087292f3c
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 109565
|
||||
packageName: Cartoon FX Remaster Free
|
||||
packageVersion: R 1.5.0
|
||||
assetPath: Assets/JMO Assets/Cartoon FX Remaster/CFXR Assets/Editor/CFXR Editor.asmdef
|
||||
uploadId: 756876
|
||||
@@ -0,0 +1,275 @@
|
||||
//--------------------------------------------------------------------------------------------------------------------------------
|
||||
// Cartoon FX
|
||||
// (c) 2012-2025 Jean Moreno
|
||||
//--------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
// Parse conditional expressions from CFXR_MaterialInspector to show/hide some parts of the UI easily
|
||||
|
||||
namespace CartoonFX
|
||||
{
|
||||
public static class ExpressionParser
|
||||
{
|
||||
public delegate bool EvaluateFunction(string content);
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------------
|
||||
// Main Function to use
|
||||
|
||||
static public bool EvaluateExpression(string expression, EvaluateFunction evalFunction)
|
||||
{
|
||||
//Remove white spaces and double && ||
|
||||
string cleanExpr = "";
|
||||
for(int i = 0; i < expression.Length; i++)
|
||||
{
|
||||
switch(expression[i])
|
||||
{
|
||||
case ' ': break;
|
||||
case '&': cleanExpr += expression[i]; i++; break;
|
||||
case '|': cleanExpr += expression[i]; i++; break;
|
||||
default: cleanExpr += expression[i]; break;
|
||||
}
|
||||
}
|
||||
|
||||
List<Token> tokens = new List<Token>();
|
||||
StringReader reader = new StringReader(cleanExpr);
|
||||
Token t = null;
|
||||
do
|
||||
{
|
||||
t = new Token(reader);
|
||||
tokens.Add(t);
|
||||
} while(t.type != Token.TokenType.EXPR_END);
|
||||
|
||||
List<Token> polishNotation = Token.TransformToPolishNotation(tokens);
|
||||
|
||||
var enumerator = polishNotation.GetEnumerator();
|
||||
enumerator.MoveNext();
|
||||
Expression root = MakeExpression(ref enumerator, evalFunction);
|
||||
|
||||
return root.Evaluate();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------------
|
||||
// Expression Token
|
||||
|
||||
public class Token
|
||||
{
|
||||
static Dictionary<char, KeyValuePair<TokenType, string>> typesDict = new Dictionary<char, KeyValuePair<TokenType, string>>()
|
||||
{
|
||||
{'(', new KeyValuePair<TokenType, string>(TokenType.OPEN_PAREN, "(")},
|
||||
{')', new KeyValuePair<TokenType, string>(TokenType.CLOSE_PAREN, ")")},
|
||||
{'!', new KeyValuePair<TokenType, string>(TokenType.UNARY_OP, "NOT")},
|
||||
{'&', new KeyValuePair<TokenType, string>(TokenType.BINARY_OP, "AND")},
|
||||
{'|', new KeyValuePair<TokenType, string>(TokenType.BINARY_OP, "OR")}
|
||||
};
|
||||
|
||||
public enum TokenType
|
||||
{
|
||||
OPEN_PAREN,
|
||||
CLOSE_PAREN,
|
||||
UNARY_OP,
|
||||
BINARY_OP,
|
||||
LITERAL,
|
||||
EXPR_END
|
||||
}
|
||||
|
||||
public TokenType type;
|
||||
public string value;
|
||||
|
||||
public Token(StringReader s)
|
||||
{
|
||||
int c = s.Read();
|
||||
if(c == -1)
|
||||
{
|
||||
type = TokenType.EXPR_END;
|
||||
value = "";
|
||||
return;
|
||||
}
|
||||
|
||||
char ch = (char)c;
|
||||
|
||||
//Special case: solve bug where !COND_FALSE_1 && COND_FALSE_2 would return True
|
||||
bool embeddedNot = (ch == '!' && s.Peek() != '(');
|
||||
|
||||
if(typesDict.ContainsKey(ch) && !embeddedNot)
|
||||
{
|
||||
type = typesDict[ch].Key;
|
||||
value = typesDict[ch].Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
string str = "";
|
||||
str += ch;
|
||||
while(s.Peek() != -1 && !typesDict.ContainsKey((char)s.Peek()))
|
||||
{
|
||||
str += (char)s.Read();
|
||||
}
|
||||
type = TokenType.LITERAL;
|
||||
value = str;
|
||||
}
|
||||
}
|
||||
|
||||
static public List<Token> TransformToPolishNotation(List<Token> infixTokenList)
|
||||
{
|
||||
Queue<Token> outputQueue = new Queue<Token>();
|
||||
Stack<Token> stack = new Stack<Token>();
|
||||
|
||||
int index = 0;
|
||||
while(infixTokenList.Count > index)
|
||||
{
|
||||
Token t = infixTokenList[index];
|
||||
|
||||
switch(t.type)
|
||||
{
|
||||
case Token.TokenType.LITERAL:
|
||||
outputQueue.Enqueue(t);
|
||||
break;
|
||||
case Token.TokenType.BINARY_OP:
|
||||
case Token.TokenType.UNARY_OP:
|
||||
case Token.TokenType.OPEN_PAREN:
|
||||
stack.Push(t);
|
||||
break;
|
||||
case Token.TokenType.CLOSE_PAREN:
|
||||
while(stack.Peek().type != Token.TokenType.OPEN_PAREN)
|
||||
{
|
||||
outputQueue.Enqueue(stack.Pop());
|
||||
}
|
||||
stack.Pop();
|
||||
if(stack.Count > 0 && stack.Peek().type == Token.TokenType.UNARY_OP)
|
||||
{
|
||||
outputQueue.Enqueue(stack.Pop());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
while(stack.Count > 0)
|
||||
{
|
||||
outputQueue.Enqueue(stack.Pop());
|
||||
}
|
||||
|
||||
var list = new List<Token>(outputQueue);
|
||||
list.Reverse();
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------------
|
||||
// Boolean Expression Classes
|
||||
|
||||
public abstract class Expression
|
||||
{
|
||||
public abstract bool Evaluate();
|
||||
}
|
||||
|
||||
public class ExpressionLeaf : Expression
|
||||
{
|
||||
private string content;
|
||||
private EvaluateFunction evalFunction;
|
||||
|
||||
public ExpressionLeaf(EvaluateFunction _evalFunction, string _content)
|
||||
{
|
||||
this.evalFunction = _evalFunction;
|
||||
this.content = _content;
|
||||
}
|
||||
|
||||
override public bool Evaluate()
|
||||
{
|
||||
//embedded not, see special case in Token declaration
|
||||
if(content.StartsWith("!"))
|
||||
{
|
||||
return !this.evalFunction(content.Substring(1));
|
||||
}
|
||||
|
||||
return this.evalFunction(content);
|
||||
}
|
||||
}
|
||||
|
||||
public class ExpressionAnd : Expression
|
||||
{
|
||||
private Expression left;
|
||||
private Expression right;
|
||||
|
||||
public ExpressionAnd(Expression _left, Expression _right)
|
||||
{
|
||||
this.left = _left;
|
||||
this.right = _right;
|
||||
}
|
||||
|
||||
override public bool Evaluate()
|
||||
{
|
||||
return left.Evaluate() && right.Evaluate();
|
||||
}
|
||||
}
|
||||
|
||||
public class ExpressionOr : Expression
|
||||
{
|
||||
private Expression left;
|
||||
private Expression right;
|
||||
|
||||
public ExpressionOr(Expression _left, Expression _right)
|
||||
{
|
||||
this.left = _left;
|
||||
this.right = _right;
|
||||
}
|
||||
|
||||
override public bool Evaluate()
|
||||
{
|
||||
return left.Evaluate() || right.Evaluate();
|
||||
}
|
||||
}
|
||||
|
||||
public class ExpressionNot : Expression
|
||||
{
|
||||
private Expression expr;
|
||||
|
||||
public ExpressionNot(Expression _expr)
|
||||
{
|
||||
this.expr = _expr;
|
||||
}
|
||||
|
||||
override public bool Evaluate()
|
||||
{
|
||||
return !expr.Evaluate();
|
||||
}
|
||||
}
|
||||
|
||||
static public Expression MakeExpression(ref List<Token>.Enumerator polishNotationTokensEnumerator, EvaluateFunction _evalFunction)
|
||||
{
|
||||
if(polishNotationTokensEnumerator.Current.type == Token.TokenType.LITERAL)
|
||||
{
|
||||
Expression lit = new ExpressionLeaf(_evalFunction, polishNotationTokensEnumerator.Current.value);
|
||||
polishNotationTokensEnumerator.MoveNext();
|
||||
return lit;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(polishNotationTokensEnumerator.Current.value == "NOT")
|
||||
{
|
||||
polishNotationTokensEnumerator.MoveNext();
|
||||
Expression operand = MakeExpression(ref polishNotationTokensEnumerator, _evalFunction);
|
||||
return new ExpressionNot(operand);
|
||||
}
|
||||
else if(polishNotationTokensEnumerator.Current.value == "AND")
|
||||
{
|
||||
polishNotationTokensEnumerator.MoveNext();
|
||||
Expression left = MakeExpression(ref polishNotationTokensEnumerator, _evalFunction);
|
||||
Expression right = MakeExpression(ref polishNotationTokensEnumerator, _evalFunction);
|
||||
return new ExpressionAnd(left, right);
|
||||
}
|
||||
else if(polishNotationTokensEnumerator.Current.value == "OR")
|
||||
{
|
||||
polishNotationTokensEnumerator.MoveNext();
|
||||
Expression left = MakeExpression(ref polishNotationTokensEnumerator, _evalFunction);
|
||||
Expression right = MakeExpression(ref polishNotationTokensEnumerator, _evalFunction);
|
||||
return new ExpressionOr(left, right);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ce7d96d3a4d4f3b4681ab437a9710d60
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 109565
|
||||
packageName: Cartoon FX Remaster Free
|
||||
packageVersion: R 1.5.0
|
||||
assetPath: Assets/JMO Assets/Cartoon FX Remaster/CFXR Assets/Editor/CFXR_ExpressionParser.cs
|
||||
uploadId: 756876
|
||||
@@ -0,0 +1,592 @@
|
||||
//--------------------------------------------------------------------------------------------------------------------------------
|
||||
// Cartoon FX
|
||||
// (c) 2012-2025 Jean Moreno
|
||||
//--------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
// Custom material inspector for Stylized FX shaders
|
||||
// - organize UI using comments in the shader code
|
||||
// - more flexibility than the material property drawers
|
||||
// version 2 (dec 2017)
|
||||
|
||||
namespace CartoonFX
|
||||
{
|
||||
public class MaterialInspector : ShaderGUI
|
||||
{
|
||||
//Set by PropertyDrawers to defined if the next properties should be visible
|
||||
static private Stack<bool> ShowStack = new Stack<bool>();
|
||||
|
||||
static public bool ShowNextProperty { get; private set; }
|
||||
static public void PushShowProperty(bool value)
|
||||
{
|
||||
ShowStack.Push(ShowNextProperty);
|
||||
ShowNextProperty &= value;
|
||||
}
|
||||
static public void PopShowProperty()
|
||||
{
|
||||
ShowNextProperty = ShowStack.Pop();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
const string kGuiCommandPrefix = "//#";
|
||||
const string kGC_IfKeyword = "IF_KEYWORD";
|
||||
const string kGC_IfProperty = "IF_PROPERTY";
|
||||
const string kGC_EndIf = "END_IF";
|
||||
const string kGC_HelpBox = "HELP_BOX";
|
||||
const string kGC_Label = "LABEL";
|
||||
|
||||
Dictionary<int, List<GUICommand>> guiCommands = new Dictionary<int, List<GUICommand>>();
|
||||
|
||||
bool initialized = false;
|
||||
AssetImporter shaderImporter;
|
||||
ulong lastTimestamp;
|
||||
void Initialize(MaterialEditor editor, bool force)
|
||||
{
|
||||
if((!initialized || force) && editor != null)
|
||||
{
|
||||
initialized = true;
|
||||
|
||||
guiCommands.Clear();
|
||||
|
||||
//Find the shader and parse the source to find special comments that will organize the GUI
|
||||
//It's hackish, but at least it allows any character to be used (unlike material property drawers/decorators) and can be used along with property drawers
|
||||
|
||||
var materials = new List<Material>();
|
||||
foreach(var o in editor.targets)
|
||||
{
|
||||
var m = o as Material;
|
||||
if(m != null)
|
||||
materials.Add(m);
|
||||
}
|
||||
if(materials.Count > 0 && materials[0].shader != null)
|
||||
{
|
||||
var path = AssetDatabase.GetAssetPath(materials[0].shader);
|
||||
//get asset importer
|
||||
shaderImporter = AssetImporter.GetAtPath(path);
|
||||
if(shaderImporter != null)
|
||||
{
|
||||
lastTimestamp = shaderImporter.assetTimeStamp;
|
||||
}
|
||||
//remove 'Assets' and replace with OS path
|
||||
path = Application.dataPath + path.Substring(6);
|
||||
//convert to cross-platform path
|
||||
path = path.Replace('/', Path.DirectorySeparatorChar);
|
||||
//open file for reading
|
||||
var lines = File.ReadAllLines(path);
|
||||
|
||||
bool insideProperties = false;
|
||||
//regex pattern to find properties, as they need to be counted so that
|
||||
//special commands can be inserted at the right position when enumerating them
|
||||
var regex = new Regex(@"[a-zA-Z0-9_]+\s*\([^\)]*\)");
|
||||
int propertyCount = 0;
|
||||
bool insideCommentBlock = false;
|
||||
foreach(var l in lines)
|
||||
{
|
||||
var line = l.TrimStart();
|
||||
|
||||
if(insideProperties)
|
||||
{
|
||||
bool isComment = line.StartsWith("//");
|
||||
|
||||
if(line.Contains("/*"))
|
||||
insideCommentBlock = true;
|
||||
if(line.Contains("*/"))
|
||||
insideCommentBlock = false;
|
||||
|
||||
//finished properties block?
|
||||
if(line.StartsWith("}"))
|
||||
break;
|
||||
|
||||
//comment
|
||||
if(line.StartsWith(kGuiCommandPrefix))
|
||||
{
|
||||
string command = line.Substring(kGuiCommandPrefix.Length).TrimStart();
|
||||
//space
|
||||
if(string.IsNullOrEmpty(command))
|
||||
AddGUICommand(propertyCount, new GC_Space());
|
||||
//separator
|
||||
else if(command.StartsWith("---"))
|
||||
AddGUICommand(propertyCount, new GC_Separator());
|
||||
//separator
|
||||
else if(command.StartsWith("==="))
|
||||
AddGUICommand(propertyCount, new GC_SeparatorDouble());
|
||||
//if keyword
|
||||
else if(command.StartsWith(kGC_IfKeyword))
|
||||
{
|
||||
var expr = command.Substring(command.LastIndexOf(kGC_IfKeyword) + kGC_IfKeyword.Length + 1);
|
||||
AddGUICommand(propertyCount, new GC_IfKeyword() { expression = expr, materials = materials.ToArray() });
|
||||
}
|
||||
//if property
|
||||
else if(command.StartsWith(kGC_IfProperty))
|
||||
{
|
||||
var expr = command.Substring(command.LastIndexOf(kGC_IfProperty) + kGC_IfProperty.Length + 1);
|
||||
AddGUICommand(propertyCount, new GC_IfProperty() { expression = expr, materials = materials.ToArray() });
|
||||
}
|
||||
//end if
|
||||
else if(command.StartsWith(kGC_EndIf))
|
||||
{
|
||||
AddGUICommand(propertyCount, new GC_EndIf());
|
||||
}
|
||||
//help box
|
||||
else if(command.StartsWith(kGC_HelpBox))
|
||||
{
|
||||
var messageType = MessageType.Error;
|
||||
var message = "Invalid format for HELP_BOX:\n" + command;
|
||||
var cmd = command.Substring(command.LastIndexOf(kGC_HelpBox) + kGC_HelpBox.Length + 1).Split(new string[] { "::" }, System.StringSplitOptions.RemoveEmptyEntries);
|
||||
if(cmd.Length == 1)
|
||||
{
|
||||
message = cmd[0];
|
||||
messageType = MessageType.None;
|
||||
}
|
||||
else if(cmd.Length == 2)
|
||||
{
|
||||
try
|
||||
{
|
||||
var msgType = (MessageType)System.Enum.Parse(typeof(MessageType), cmd[0], true);
|
||||
message = cmd[1].Replace(" ", "\n");
|
||||
messageType = msgType;
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
AddGUICommand(propertyCount, new GC_HelpBox()
|
||||
{
|
||||
message = message,
|
||||
messageType = messageType
|
||||
});
|
||||
}
|
||||
//label
|
||||
else if(command.StartsWith(kGC_Label))
|
||||
{
|
||||
var label = command.Substring(command.LastIndexOf(kGC_Label) + kGC_Label.Length + 1);
|
||||
AddGUICommand(propertyCount, new GC_Label() { label = label });
|
||||
}
|
||||
//header: plain text after command
|
||||
else
|
||||
{
|
||||
AddGUICommand(propertyCount, new GC_Header() { label = command });
|
||||
}
|
||||
}
|
||||
else
|
||||
//property
|
||||
{
|
||||
if(regex.IsMatch(line) && !insideCommentBlock && !isComment)
|
||||
propertyCount++;
|
||||
}
|
||||
}
|
||||
|
||||
//start properties block?
|
||||
if(line.StartsWith("Properties"))
|
||||
{
|
||||
insideProperties = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AddGUICommand(int propertyIndex, GUICommand command)
|
||||
{
|
||||
if(!guiCommands.ContainsKey(propertyIndex))
|
||||
guiCommands.Add(propertyIndex, new List<GUICommand>());
|
||||
|
||||
guiCommands[propertyIndex].Add(command);
|
||||
}
|
||||
|
||||
public override void AssignNewShaderToMaterial(Material material, Shader oldShader, Shader newShader)
|
||||
{
|
||||
initialized = false;
|
||||
base.AssignNewShaderToMaterial(material, oldShader, newShader);
|
||||
}
|
||||
|
||||
public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
|
||||
{
|
||||
//init:
|
||||
//- read metadata in properties comment to generate ui layout
|
||||
//- force update if timestamp doesn't match last (= file externally updated)
|
||||
bool force = (shaderImporter != null && shaderImporter.assetTimeStamp != lastTimestamp);
|
||||
Initialize(materialEditor, force);
|
||||
|
||||
var shader = (materialEditor.target as Material).shader;
|
||||
materialEditor.SetDefaultGUIWidths();
|
||||
|
||||
//show all properties by default
|
||||
ShowNextProperty = true;
|
||||
ShowStack.Clear();
|
||||
|
||||
for(int i = 0; i < properties.Length; i++)
|
||||
{
|
||||
if(guiCommands.ContainsKey(i))
|
||||
{
|
||||
for(int j = 0; j < guiCommands[i].Count; j++)
|
||||
{
|
||||
guiCommands[i][j].OnGUI();
|
||||
}
|
||||
}
|
||||
|
||||
//Use custom properties to enable/disable groups based on keywords
|
||||
if(ShowNextProperty)
|
||||
{
|
||||
if((properties[i].propertyFlags & (UnityEngine.Rendering.ShaderPropertyFlags.HideInInspector | UnityEngine.Rendering.ShaderPropertyFlags.PerRendererData)) == UnityEngine.Rendering.ShaderPropertyFlags.None)
|
||||
{
|
||||
DisplayProperty(properties[i], materialEditor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//make sure to show gui commands that are after properties
|
||||
int index = properties.Length;
|
||||
if(guiCommands.ContainsKey(index))
|
||||
{
|
||||
for(int j = 0; j < guiCommands[index].Count; j++)
|
||||
{
|
||||
guiCommands[index][j].OnGUI();
|
||||
}
|
||||
}
|
||||
|
||||
//Special fields
|
||||
Styles.MaterialDrawSeparatorDouble();
|
||||
materialEditor.RenderQueueField();
|
||||
materialEditor.EnableInstancingField();
|
||||
}
|
||||
|
||||
virtual protected void DisplayProperty(MaterialProperty property, MaterialEditor materialEditor)
|
||||
{
|
||||
float propertyHeight = materialEditor.GetPropertyHeight(property, property.displayName);
|
||||
Rect controlRect = EditorGUILayout.GetControlRect(true, propertyHeight, EditorStyles.layerMaskField, new GUILayoutOption[0]);
|
||||
materialEditor.ShaderProperty(controlRect, property, property.displayName);
|
||||
}
|
||||
}
|
||||
|
||||
// Same as Toggle drawer, but doesn't set any keyword
|
||||
// This will avoid adding unnecessary shader keyword to the project
|
||||
internal class MaterialToggleNoKeywordDrawer : MaterialPropertyDrawer
|
||||
{
|
||||
private static bool IsPropertyTypeSuitable(MaterialProperty prop)
|
||||
{
|
||||
return prop.propertyType == UnityEngine.Rendering.ShaderPropertyType.Float || prop.propertyType == UnityEngine.Rendering.ShaderPropertyType.Range;
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(MaterialProperty prop, string label, MaterialEditor editor)
|
||||
{
|
||||
float height;
|
||||
if (!MaterialToggleNoKeywordDrawer.IsPropertyTypeSuitable(prop))
|
||||
{
|
||||
height = 40f;
|
||||
}
|
||||
else
|
||||
{
|
||||
height = base.GetPropertyHeight(prop, label, editor);
|
||||
}
|
||||
return height;
|
||||
}
|
||||
|
||||
public override void OnGUI(Rect position, MaterialProperty prop, GUIContent label, MaterialEditor editor)
|
||||
{
|
||||
if (!MaterialToggleNoKeywordDrawer.IsPropertyTypeSuitable(prop))
|
||||
{
|
||||
EditorGUI.HelpBox(position, "Toggle used on a non-float property: " + prop.name, MessageType.Warning);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUI.BeginChangeCheck();
|
||||
bool flag = Mathf.Abs(prop.floatValue) > 0.001f;
|
||||
EditorGUI.showMixedValue = prop.hasMixedValue;
|
||||
flag = EditorGUI.Toggle(position, label, flag);
|
||||
EditorGUI.showMixedValue = false;
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
prop.floatValue = ((!flag) ? 0f : 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Same as KeywordEnum drawer, but uses the keyword supplied as is rather than adding a prefix to them
|
||||
internal class MaterialKeywordEnumNoPrefixDrawer : MaterialPropertyDrawer
|
||||
{
|
||||
private readonly GUIContent[] labels;
|
||||
private readonly string[] keywords;
|
||||
|
||||
public MaterialKeywordEnumNoPrefixDrawer(string lbl1, string kw1) : this(new[] { lbl1 }, new[] { kw1 }) { }
|
||||
public MaterialKeywordEnumNoPrefixDrawer(string lbl1, string kw1, string lbl2, string kw2) : this(new[] { lbl1, lbl2 }, new[] { kw1, kw2 }) { }
|
||||
public MaterialKeywordEnumNoPrefixDrawer(string lbl1, string kw1, string lbl2, string kw2, string lbl3, string kw3) : this(new[] { lbl1, lbl2, lbl3 }, new[] { kw1, kw2, kw3 }) { }
|
||||
public MaterialKeywordEnumNoPrefixDrawer(string lbl1, string kw1, string lbl2, string kw2, string lbl3, string kw3, string lbl4, string kw4) : this(new[] { lbl1, lbl2, lbl3, lbl4 }, new[] { kw1, kw2, kw3, kw4 }) { }
|
||||
public MaterialKeywordEnumNoPrefixDrawer(string lbl1, string kw1, string lbl2, string kw2, string lbl3, string kw3, string lbl4, string kw4, string lbl5, string kw5) : this(new[] { lbl1, lbl2, lbl3, lbl4, lbl5 }, new[] { kw1, kw2, kw3, kw4, kw5 }) { }
|
||||
public MaterialKeywordEnumNoPrefixDrawer(string lbl1, string kw1, string lbl2, string kw2, string lbl3, string kw3, string lbl4, string kw4, string lbl5, string kw5, string lbl6, string kw6) : this(new[] { lbl1, lbl2, lbl3, lbl4, lbl5, lbl6 }, new[] { kw1, kw2, kw3, kw4, kw5, kw6 }) { }
|
||||
|
||||
public MaterialKeywordEnumNoPrefixDrawer(string[] labels, string[] keywords)
|
||||
{
|
||||
this.labels= new GUIContent[keywords.Length];
|
||||
this.keywords = new string[keywords.Length];
|
||||
for (int i = 0; i < keywords.Length; ++i)
|
||||
{
|
||||
this.labels[i] = new GUIContent(labels[i]);
|
||||
this.keywords[i] = keywords[i];
|
||||
}
|
||||
}
|
||||
|
||||
static bool IsPropertyTypeSuitable(MaterialProperty prop)
|
||||
{
|
||||
return prop.propertyType == UnityEngine.Rendering.ShaderPropertyType.Float || prop.propertyType == UnityEngine.Rendering.ShaderPropertyType.Range;
|
||||
}
|
||||
|
||||
void SetKeyword(MaterialProperty prop, int index)
|
||||
{
|
||||
for (int i = 0; i < keywords.Length; ++i)
|
||||
{
|
||||
string keyword = GetKeywordName(prop.name, keywords[i]);
|
||||
foreach (Material material in prop.targets)
|
||||
{
|
||||
if (index == i)
|
||||
material.EnableKeyword(keyword);
|
||||
else
|
||||
material.DisableKeyword(keyword);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override float GetPropertyHeight(MaterialProperty prop, string label, MaterialEditor editor)
|
||||
{
|
||||
if (!IsPropertyTypeSuitable(prop))
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight * 2.5f;
|
||||
}
|
||||
return base.GetPropertyHeight(prop, label, editor);
|
||||
}
|
||||
|
||||
public override void OnGUI(Rect position, MaterialProperty prop, GUIContent label, MaterialEditor editor)
|
||||
{
|
||||
if (!IsPropertyTypeSuitable(prop))
|
||||
{
|
||||
EditorGUI.HelpBox(position, "Toggle used on a non-float property: " + prop.name, MessageType.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
EditorGUI.showMixedValue = prop.hasMixedValue;
|
||||
var value = (int)prop.floatValue;
|
||||
value = EditorGUI.Popup(position, label, value, labels);
|
||||
EditorGUI.showMixedValue = false;
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
prop.floatValue = value;
|
||||
SetKeyword(prop, value);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Apply(MaterialProperty prop)
|
||||
{
|
||||
base.Apply(prop);
|
||||
if (!IsPropertyTypeSuitable(prop))
|
||||
return;
|
||||
|
||||
if (prop.hasMixedValue)
|
||||
return;
|
||||
|
||||
SetKeyword(prop, (int)prop.floatValue);
|
||||
}
|
||||
|
||||
// Final keyword name: property name + "_" + display name. Uppercased,
|
||||
// and spaces replaced with underscores.
|
||||
private static string GetKeywordName(string propName, string name)
|
||||
{
|
||||
// Just return the supplied name
|
||||
return name;
|
||||
|
||||
// Original code:
|
||||
/*
|
||||
string n = propName + "_" + name;
|
||||
return n.Replace(' ', '_').ToUpperInvariant();
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//================================================================================================================================================================================================
|
||||
// GUI Commands System
|
||||
//
|
||||
// Workaround to Material Property Drawers limitations:
|
||||
// - uses shader comments to organize the GUI, and show/hide properties based on conditions
|
||||
// - can use any character (unlike property drawers)
|
||||
// - parsed once at material editor initialization
|
||||
|
||||
internal class GUICommand
|
||||
{
|
||||
public virtual bool Visible() { return true; }
|
||||
public virtual void OnGUI() { }
|
||||
}
|
||||
|
||||
internal class GC_Separator : GUICommand { public override void OnGUI() { if(MaterialInspector.ShowNextProperty) Styles.MaterialDrawSeparator(); } }
|
||||
internal class GC_SeparatorDouble : GUICommand { public override void OnGUI() { if(MaterialInspector.ShowNextProperty) Styles.MaterialDrawSeparatorDouble(); } }
|
||||
internal class GC_Space : GUICommand { public override void OnGUI() { if(MaterialInspector.ShowNextProperty) GUILayout.Space(8); } }
|
||||
internal class GC_HelpBox : GUICommand
|
||||
{
|
||||
public string message { get; set; }
|
||||
public MessageType messageType { get; set; }
|
||||
|
||||
public override void OnGUI()
|
||||
{
|
||||
if(MaterialInspector.ShowNextProperty)
|
||||
Styles.HelpBoxRichText(message, messageType);
|
||||
}
|
||||
}
|
||||
internal class GC_Header : GUICommand
|
||||
{
|
||||
public string label { get; set; }
|
||||
GUIContent guiContent;
|
||||
|
||||
public override void OnGUI()
|
||||
{
|
||||
if(guiContent == null)
|
||||
guiContent = new GUIContent(label);
|
||||
|
||||
if(MaterialInspector.ShowNextProperty)
|
||||
Styles.MaterialDrawHeader(guiContent);
|
||||
}
|
||||
}
|
||||
internal class GC_Label : GUICommand
|
||||
{
|
||||
public string label { get; set; }
|
||||
GUIContent guiContent;
|
||||
|
||||
public override void OnGUI()
|
||||
{
|
||||
if(guiContent == null)
|
||||
guiContent = new GUIContent(label);
|
||||
|
||||
if(MaterialInspector.ShowNextProperty)
|
||||
GUILayout.Label(guiContent);
|
||||
}
|
||||
}
|
||||
internal class GC_IfKeyword : GUICommand
|
||||
{
|
||||
public string expression { get; set; }
|
||||
public Material[] materials { get; set; }
|
||||
public override void OnGUI()
|
||||
{
|
||||
bool show = ExpressionParser.EvaluateExpression(expression, (string s) =>
|
||||
{
|
||||
foreach(var m in materials)
|
||||
{
|
||||
if(m.IsKeywordEnabled(s))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
MaterialInspector.PushShowProperty(show);
|
||||
}
|
||||
}
|
||||
internal class GC_EndIf : GUICommand { public override void OnGUI() { MaterialInspector.PopShowProperty(); } }
|
||||
|
||||
internal class GC_IfProperty : GUICommand
|
||||
{
|
||||
string _expression;
|
||||
public string expression
|
||||
{
|
||||
get { return _expression; }
|
||||
set { _expression = value.Replace("!=", "<>"); }
|
||||
}
|
||||
public Material[] materials { get; set; }
|
||||
|
||||
public override void OnGUI()
|
||||
{
|
||||
bool show = ExpressionParser.EvaluateExpression(expression, EvaluatePropertyExpression);
|
||||
MaterialInspector.PushShowProperty(show);
|
||||
}
|
||||
|
||||
bool EvaluatePropertyExpression(string expr)
|
||||
{
|
||||
//expression is expected to be in the form of: property operator value
|
||||
var reader = new StringReader(expr);
|
||||
string property = "";
|
||||
string op = "";
|
||||
float value = 0f;
|
||||
|
||||
int overflow = 0;
|
||||
while(true)
|
||||
{
|
||||
char c = (char)reader.Read();
|
||||
|
||||
//operator
|
||||
if(c == '=' || c == '>' || c == '<' || c == '!')
|
||||
{
|
||||
op += c;
|
||||
//second operator character, if any
|
||||
char c2 = (char)reader.Peek();
|
||||
if(c2 == '=' || c2 == '>')
|
||||
{
|
||||
reader.Read();
|
||||
op += c2;
|
||||
}
|
||||
|
||||
//end of string is the value
|
||||
var end = reader.ReadToEnd();
|
||||
if(!float.TryParse(end, out value))
|
||||
{
|
||||
Debug.LogError("Couldn't parse float from property expression:\n" + end);
|
||||
return false;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
//property name
|
||||
property += c;
|
||||
|
||||
overflow++;
|
||||
if(overflow >= 9999)
|
||||
{
|
||||
Debug.LogError("Expression parsing overflow!\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//evaluate property
|
||||
bool conditionMet = false;
|
||||
foreach(var m in materials)
|
||||
{
|
||||
float propValue = 0f;
|
||||
if(property.Contains(".x") || property.Contains(".y") || property.Contains(".z") || property.Contains(".w"))
|
||||
{
|
||||
string[] split = property.Split('.');
|
||||
string component = split[1];
|
||||
switch(component)
|
||||
{
|
||||
case "x": propValue = m.GetVector(split[0]).x; break;
|
||||
case "y": propValue = m.GetVector(split[0]).y; break;
|
||||
case "z": propValue = m.GetVector(split[0]).z; break;
|
||||
case "w": propValue = m.GetVector(split[0]).w; break;
|
||||
default: Debug.LogError("Invalid component for vector property: '" + property + "'"); break;
|
||||
}
|
||||
}
|
||||
else
|
||||
propValue = m.GetFloat(property);
|
||||
|
||||
switch(op)
|
||||
{
|
||||
case ">=": conditionMet = propValue >= value; break;
|
||||
case "<=": conditionMet = propValue <= value; break;
|
||||
case ">": conditionMet = propValue > value; break;
|
||||
case "<": conditionMet = propValue < value; break;
|
||||
case "<>": conditionMet = propValue != value; break; //not equal, "!=" is replaced by "<>" to prevent bug with leading ! ("not" operator)
|
||||
case "==": conditionMet = propValue == value; break;
|
||||
default:
|
||||
Debug.LogError("Invalid property expression:\n" + expr);
|
||||
break;
|
||||
}
|
||||
if(conditionMet)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4fb4c15e772a1cc4baecc7a958bf9cc7
|
||||
timeCreated: 1486392341
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 109565
|
||||
packageName: Cartoon FX Remaster Free
|
||||
packageVersion: R 1.5.0
|
||||
assetPath: Assets/JMO Assets/Cartoon FX Remaster/CFXR Assets/Editor/CFXR_MaterialInspector.cs
|
||||
uploadId: 756876
|
||||
@@ -0,0 +1,423 @@
|
||||
// #define SHOW_EXPORT_BUTTON
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Rendering;
|
||||
using UnityEngine;
|
||||
#if UNITY_2020_2_OR_NEWER
|
||||
using UnityEditor.AssetImporters;
|
||||
#else
|
||||
using UnityEditor.Experimental.AssetImporters;
|
||||
#endif
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
namespace CartoonFX
|
||||
{
|
||||
namespace CustomShaderImporter
|
||||
{
|
||||
static class Utils
|
||||
{
|
||||
public static bool IsUsingURP()
|
||||
{
|
||||
#if UNITY_2019_3_OR_NEWER
|
||||
var renderPipeline = GraphicsSettings.currentRenderPipeline;
|
||||
#else
|
||||
var renderPipeline = GraphicsSettings.renderPipelineAsset;
|
||||
#endif
|
||||
return renderPipeline != null && renderPipeline.GetType().Name.Contains("Universal");
|
||||
}
|
||||
}
|
||||
|
||||
[ScriptedImporter(0, FILE_EXTENSION)]
|
||||
public class CFXR_ShaderImporter : ScriptedImporter
|
||||
{
|
||||
public enum RenderPipeline
|
||||
{
|
||||
Auto,
|
||||
ForceBuiltInRenderPipeline,
|
||||
ForceUniversalRenderPipeline
|
||||
}
|
||||
|
||||
public const string FILE_EXTENSION = "cfxrshader";
|
||||
|
||||
[Tooltip("In case of errors when building the project or with addressables, you can try forcing a specific render pipeline")]
|
||||
public RenderPipeline renderPipelineDetection = RenderPipeline.Auto;
|
||||
public string detectedRenderPipeline = "Built-In Render Pipeline";
|
||||
public int strippedLinesCount = 0;
|
||||
public string shaderSourceCode;
|
||||
public string shaderName;
|
||||
public string[] shaderErrors;
|
||||
public ulong variantCount;
|
||||
public ulong variantCountUsed;
|
||||
|
||||
enum ComparisonOperator
|
||||
{
|
||||
Equal,
|
||||
Greater,
|
||||
GreaterOrEqual,
|
||||
Less,
|
||||
LessOrEqual
|
||||
}
|
||||
|
||||
#if UNITY_2022_2_OR_NEWER
|
||||
const int URP_VERSION = 14;
|
||||
#elif UNITY_2021_2_OR_NEWER
|
||||
const int URP_VERSION = 12;
|
||||
#elif UNITY_2021_1_OR_NEWER
|
||||
const int URP_VERSION = 11;
|
||||
#elif UNITY_2020_3_OR_NEWER
|
||||
const int URP_VERSION = 10;
|
||||
#else
|
||||
const int URP_VERSION = 7;
|
||||
#endif
|
||||
|
||||
static ComparisonOperator ParseComparisonOperator(string symbols)
|
||||
{
|
||||
switch (symbols)
|
||||
{
|
||||
case "==": return ComparisonOperator.Equal;
|
||||
case "<=": return ComparisonOperator.LessOrEqual;
|
||||
case "<": return ComparisonOperator.Less;
|
||||
case ">": return ComparisonOperator.Greater;
|
||||
case ">=": return ComparisonOperator.GreaterOrEqual;
|
||||
default: throw new Exception("Invalid comparison operator: " + symbols);
|
||||
}
|
||||
}
|
||||
|
||||
static bool CompareWithOperator(int value1, int value2, ComparisonOperator comparisonOperator)
|
||||
{
|
||||
switch (comparisonOperator)
|
||||
{
|
||||
case ComparisonOperator.Equal: return value1 == value2;
|
||||
case ComparisonOperator.Greater: return value1 > value2;
|
||||
case ComparisonOperator.GreaterOrEqual: return value1 >= value2;
|
||||
case ComparisonOperator.Less: return value1 < value2;
|
||||
case ComparisonOperator.LessOrEqual: return value1 <= value2;
|
||||
default: throw new Exception("Invalid comparison operator value: " + comparisonOperator);
|
||||
}
|
||||
}
|
||||
|
||||
bool StartsOrEndWithSpecialTag(string line)
|
||||
{
|
||||
bool startsWithTag = (line.Length > 4 && line[0] == '/' && line[1] == '*' && line[2] == '*' && line[3] == '*');
|
||||
if (startsWithTag) return true;
|
||||
|
||||
int l = line.Length-1;
|
||||
bool endsWithTag = (line.Length > 4 && line[l] == '/' && line[l-1] == '*' && line[l-2] == '*' && line[l-3] == '*');
|
||||
return endsWithTag;
|
||||
}
|
||||
|
||||
public override void OnImportAsset(AssetImportContext context)
|
||||
{
|
||||
bool isUsingURP;
|
||||
switch (renderPipelineDetection)
|
||||
{
|
||||
default:
|
||||
case RenderPipeline.Auto:
|
||||
{
|
||||
isUsingURP = Utils.IsUsingURP();
|
||||
detectedRenderPipeline = isUsingURP ? "Universal Render Pipeline" : "Built-In Render Pipeline";
|
||||
break;
|
||||
}
|
||||
case RenderPipeline.ForceBuiltInRenderPipeline:
|
||||
{
|
||||
detectedRenderPipeline = "Built-In Render Pipeline";
|
||||
isUsingURP = false;
|
||||
break;
|
||||
}
|
||||
case RenderPipeline.ForceUniversalRenderPipeline:
|
||||
{
|
||||
detectedRenderPipeline = "Universal Render Pipeline";
|
||||
isUsingURP = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
StringWriter shaderSource = new StringWriter();
|
||||
string[] sourceLines = File.ReadAllLines(context.assetPath);
|
||||
Stack<bool> excludeCurrentLines = new Stack<bool>();
|
||||
strippedLinesCount = 0;
|
||||
|
||||
for (int i = 0; i < sourceLines.Length; i++)
|
||||
{
|
||||
bool excludeThisLine = excludeCurrentLines.Count > 0 && excludeCurrentLines.Peek();
|
||||
|
||||
string line = sourceLines[i];
|
||||
if (StartsOrEndWithSpecialTag(line))
|
||||
{
|
||||
if (line.StartsWith("/*** BIRP ***/"))
|
||||
{
|
||||
excludeCurrentLines.Push(excludeThisLine || isUsingURP);
|
||||
}
|
||||
else if (line.StartsWith("/*** URP ***/"))
|
||||
{
|
||||
excludeCurrentLines.Push(excludeThisLine || !isUsingURP);
|
||||
}
|
||||
else if (line.StartsWith("/*** URP_VERSION "))
|
||||
{
|
||||
string subline = line.Substring("/*** URP_VERSION ".Length);
|
||||
int spaceIndex = subline.IndexOf(' ');
|
||||
string version = subline.Substring(spaceIndex, subline.LastIndexOf(' ') - spaceIndex);
|
||||
string op = subline.Substring(0, spaceIndex);
|
||||
|
||||
var compOp = ParseComparisonOperator(op);
|
||||
int compVersion = int.Parse(version);
|
||||
|
||||
bool isCorrectURP = CompareWithOperator(URP_VERSION, compVersion, compOp);
|
||||
excludeCurrentLines.Push(excludeThisLine || !isCorrectURP);
|
||||
}
|
||||
else if (excludeThisLine && line.StartsWith("/*** END"))
|
||||
{
|
||||
excludeCurrentLines.Pop();
|
||||
}
|
||||
else if (!excludeThisLine && line.StartsWith("/*** #define URP_VERSION ***/"))
|
||||
{
|
||||
shaderSource.WriteLine("\t\t\t#define URP_VERSION " + URP_VERSION);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (excludeThisLine)
|
||||
{
|
||||
strippedLinesCount++;
|
||||
continue;
|
||||
}
|
||||
|
||||
shaderSource.WriteLine(line);
|
||||
}
|
||||
}
|
||||
|
||||
// Get source code and extract name
|
||||
shaderSourceCode = shaderSource.ToString();
|
||||
int idx = shaderSourceCode.IndexOf("Shader \"", StringComparison.InvariantCulture) + 8;
|
||||
int idx2 = shaderSourceCode.IndexOf('"', idx);
|
||||
shaderName = shaderSourceCode.Substring(idx, idx2 - idx);
|
||||
shaderErrors = null;
|
||||
|
||||
Shader shader = ShaderUtil.CreateShaderAsset(context, shaderSourceCode, true);
|
||||
|
||||
if (ShaderUtil.ShaderHasError(shader))
|
||||
{
|
||||
string[] shaderSourceLines = shaderSourceCode.Split(new [] {'\n'}, StringSplitOptions.None);
|
||||
var errors = ShaderUtil.GetShaderMessages(shader);
|
||||
shaderErrors = Array.ConvertAll(errors, err => $"{err.message} (line {err.line})");
|
||||
foreach (ShaderMessage error in errors)
|
||||
{
|
||||
string message = error.line <= 0 ?
|
||||
string.Format("Shader Error in '{0}' (in file '{2}')\nError: {1}\n", shaderName, error.message, error.file) :
|
||||
string.Format("Shader Error in '{0}' (line {2} in file '{3}')\nError: {1}\nLine: {4}\n", shaderName, error.message, error.line, error.file, shaderSourceLines[error.line-1]);
|
||||
if (error.severity == ShaderCompilerMessageSeverity.Warning)
|
||||
{
|
||||
Debug.LogWarning(message);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShaderUtil.ClearShaderMessages(shader);
|
||||
}
|
||||
|
||||
context.AddObjectToAsset("MainAsset", shader);
|
||||
context.SetMainObject(shader);
|
||||
|
||||
// Try to count variant using reflection:
|
||||
// internal static extern ulong GetVariantCount(Shader s, bool usedBySceneOnly);
|
||||
variantCount = 0;
|
||||
variantCountUsed = 0;
|
||||
MethodInfo getVariantCountReflection = typeof(ShaderUtil).GetMethod("GetVariantCount", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
if (getVariantCountReflection != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
object result = getVariantCountReflection.Invoke(null, new object[] {shader, false});
|
||||
variantCount = (ulong)result;
|
||||
result = getVariantCountReflection.Invoke(null, new object[] {shader, true});
|
||||
variantCountUsed = (ulong)result;
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace Inspector
|
||||
{
|
||||
[CustomEditor(typeof(CFXR_ShaderImporter)), CanEditMultipleObjects]
|
||||
public class TCP2ShaderImporter_Editor : Editor
|
||||
{
|
||||
CFXR_ShaderImporter Importer => (CFXR_ShaderImporter) this.target;
|
||||
|
||||
// From: UnityEditor.ShaderInspectorPlatformsPopup
|
||||
static string FormatCount(ulong count)
|
||||
{
|
||||
bool flag = count > 1000000000uL;
|
||||
string result;
|
||||
if (flag)
|
||||
{
|
||||
result = (count / 1000000000.0).ToString("f2", CultureInfo.InvariantCulture.NumberFormat) + "B";
|
||||
}
|
||||
else
|
||||
{
|
||||
bool flag2 = count > 1000000uL;
|
||||
if (flag2)
|
||||
{
|
||||
result = (count / 1000000.0).ToString("f2", CultureInfo.InvariantCulture.NumberFormat) + "M";
|
||||
}
|
||||
else
|
||||
{
|
||||
bool flag3 = count > 1000uL;
|
||||
if (flag3)
|
||||
{
|
||||
result = (count / 1000.0).ToString("f2", CultureInfo.InvariantCulture.NumberFormat) + "k";
|
||||
}
|
||||
else
|
||||
{
|
||||
result = count.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static GUIStyle _HelpBoxRichTextStyle;
|
||||
static GUIStyle HelpBoxRichTextStyle
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_HelpBoxRichTextStyle == null)
|
||||
{
|
||||
_HelpBoxRichTextStyle = new GUIStyle("HelpBox");
|
||||
_HelpBoxRichTextStyle.richText = true;
|
||||
_HelpBoxRichTextStyle.margin = new RectOffset(4, 4, 0, 0);
|
||||
_HelpBoxRichTextStyle.padding = new RectOffset(4, 4, 4, 4);
|
||||
}
|
||||
return _HelpBoxRichTextStyle;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
bool multipleValues = serializedObject.isEditingMultipleObjects;
|
||||
|
||||
CFXR_ShaderImporter.RenderPipeline detection = ((CFXR_ShaderImporter)target).renderPipelineDetection;
|
||||
bool isUsingURP = Utils.IsUsingURP();
|
||||
serializedObject.Update();
|
||||
|
||||
GUILayout.Label(Importer.shaderName);
|
||||
string variantsText = "";
|
||||
if (Importer.variantCount > 0 && Importer.variantCountUsed > 0)
|
||||
{
|
||||
string variantsCount = multipleValues ? "-" : FormatCount(Importer.variantCount);
|
||||
string variantsCountUsed = multipleValues ? "-" : FormatCount(Importer.variantCountUsed);
|
||||
variantsText = $"\nVariants (currently used): <b>{variantsCountUsed}</b>\nVariants (including unused): <b>{variantsCount}</b>";
|
||||
}
|
||||
string strippedLinesCount = multipleValues ? "-" : Importer.strippedLinesCount.ToString();
|
||||
string renderPipeline = Importer.detectedRenderPipeline;
|
||||
if (targets is { Length: > 1 })
|
||||
{
|
||||
foreach (CFXR_ShaderImporter importer in targets)
|
||||
{
|
||||
if (importer.detectedRenderPipeline != renderPipeline)
|
||||
{
|
||||
renderPipeline = "-";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
GUILayout.Label($"{(detection == CFXR_ShaderImporter.RenderPipeline.Auto ? "Detected" : "Forced")} render pipeline: <b>{renderPipeline}</b>\nStripped lines: <b>{strippedLinesCount}</b>{variantsText}", HelpBoxRichTextStyle);
|
||||
|
||||
if (Importer.shaderErrors != null && Importer.shaderErrors.Length > 0)
|
||||
{
|
||||
GUILayout.Space(4);
|
||||
var color = GUI.color;
|
||||
GUI.color = new Color32(0xFF, 0x80, 0x80, 0xFF);
|
||||
GUILayout.Label($"<b>Errors:</b>\n{string.Join("\n", Importer.shaderErrors)}", HelpBoxRichTextStyle);
|
||||
GUI.color = color;
|
||||
}
|
||||
|
||||
bool shouldReimportShader = false;
|
||||
bool compiledForURP = Importer.detectedRenderPipeline.Contains("Universal");
|
||||
if (detection == CFXR_ShaderImporter.RenderPipeline.Auto
|
||||
&& ((isUsingURP && !compiledForURP) || (!isUsingURP && compiledForURP)))
|
||||
{
|
||||
GUILayout.Space(4);
|
||||
Color guiColor = GUI.color;
|
||||
GUI.color *= Color.yellow;
|
||||
EditorGUILayout.HelpBox("The detected render pipeline doesn't match the pipeline this shader was compiled for!\nPlease reimport the shaders for them to work in the current render pipeline.", MessageType.Warning);
|
||||
if (GUILayout.Button("Reimport Shader"))
|
||||
{
|
||||
shouldReimportShader = true;
|
||||
}
|
||||
GUI.color = guiColor;
|
||||
}
|
||||
|
||||
GUILayout.Space(4);
|
||||
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty(nameof(CFXR_ShaderImporter.renderPipelineDetection)));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
shouldReimportShader = true;
|
||||
}
|
||||
|
||||
if (GUILayout.Button("View Source", GUILayout.ExpandWidth(false)))
|
||||
{
|
||||
string path = Application.temporaryCachePath + "/" + Importer.shaderName.Replace("/", "-") + "_Source.shader";
|
||||
if (File.Exists(path))
|
||||
{
|
||||
File.SetAttributes(path, FileAttributes.Normal);
|
||||
}
|
||||
|
||||
File.WriteAllText(path, Importer.shaderSourceCode);
|
||||
File.SetAttributes(path, FileAttributes.ReadOnly);
|
||||
UnityEditorInternal.InternalEditorUtility.OpenFileAtLineExternal(path, 0);
|
||||
}
|
||||
|
||||
#if SHOW_EXPORT_BUTTON
|
||||
GUILayout.Space(8);
|
||||
|
||||
EditorGUI.BeginDisabledGroup(string.IsNullOrEmpty(importer.shaderSourceCode));
|
||||
{
|
||||
if (GUILayout.Button("Export .shader file", GUILayout.ExpandWidth(false)))
|
||||
{
|
||||
string savePath = EditorUtility.SaveFilePanel("Export CFXR shader", Application.dataPath, "CFXR Shader","shader");
|
||||
if (!string.IsNullOrEmpty(savePath))
|
||||
{
|
||||
File.WriteAllText(savePath, importer.shaderSourceCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
EditorGUI.EndDisabledGroup();
|
||||
#endif
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
|
||||
if (shouldReimportShader)
|
||||
{
|
||||
ReimportShader();
|
||||
}
|
||||
}
|
||||
|
||||
void ReimportShader()
|
||||
{
|
||||
foreach (UnityEngine.Object t in targets)
|
||||
{
|
||||
string path = AssetDatabase.GetAssetPath(t);
|
||||
AssetDatabase.ImportAsset(path, ImportAssetOptions.ForceSynchronousImport);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fe56ec25963759b49955809beeb4324b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 109565
|
||||
packageName: Cartoon FX Remaster Free
|
||||
packageVersion: R 1.5.0
|
||||
assetPath: Assets/JMO Assets/Cartoon FX Remaster/CFXR Assets/Editor/CFXR_ShaderImporter.cs
|
||||
uploadId: 756876
|
||||
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace CartoonFX
|
||||
{
|
||||
namespace CustomShaderImporter
|
||||
{
|
||||
public class CFXR_ShaderPostProcessor : AssetPostprocessor
|
||||
{
|
||||
static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
|
||||
{
|
||||
CleanCFXRShaders(importedAssets);
|
||||
}
|
||||
|
||||
static void CleanCFXRShaders(string[] paths)
|
||||
{
|
||||
foreach (var assetPath in paths)
|
||||
{
|
||||
if (!assetPath.EndsWith(CFXR_ShaderImporter.FILE_EXTENSION, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var shader = AssetDatabase.LoadMainAssetAtPath(assetPath) as Shader;
|
||||
if (shader != null)
|
||||
{
|
||||
ShaderUtil.ClearShaderMessages(shader);
|
||||
if (!ShaderUtil.ShaderHasError(shader))
|
||||
{
|
||||
ShaderUtil.RegisterShader(shader);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 29d46695388f9a84d9ae71b5140727a3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 109565
|
||||
packageName: Cartoon FX Remaster Free
|
||||
packageVersion: R 1.5.0
|
||||
assetPath: Assets/JMO Assets/Cartoon FX Remaster/CFXR Assets/Editor/CFXR_ShaderPostProcessor.cs
|
||||
uploadId: 756876
|
||||
@@ -0,0 +1,362 @@
|
||||
//--------------------------------------------------------------------------------------------------------------------------------
|
||||
// Cartoon FX
|
||||
// (c) 2012-2025 Jean Moreno
|
||||
//--------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
// GUI Styles and UI methods
|
||||
|
||||
namespace CartoonFX
|
||||
{
|
||||
public static class Styles
|
||||
{
|
||||
//================================================================================================================================
|
||||
// GUI Styles
|
||||
//================================================================================================================================
|
||||
|
||||
//================================================================================================================================
|
||||
// (x) close button
|
||||
static GUIStyle _closeCrossButton;
|
||||
public static GUIStyle CloseCrossButton
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_closeCrossButton == null)
|
||||
{
|
||||
//Try to load GUISkin according to its GUID
|
||||
//Assumes that its .meta file should always stick with it!
|
||||
string guiSkinPath = AssetDatabase.GUIDToAssetPath("02d396fa782e5d7438e231ea9f8be23c");
|
||||
var gs = AssetDatabase.LoadAssetAtPath<GUISkin>(guiSkinPath);
|
||||
if(gs != null)
|
||||
{
|
||||
_closeCrossButton = System.Array.Find<GUIStyle>(gs.customStyles, x => x.name == "CloseCrossButton");
|
||||
}
|
||||
|
||||
//Else fall back to minibutton
|
||||
if(_closeCrossButton == null)
|
||||
_closeCrossButton = EditorStyles.miniButton;
|
||||
}
|
||||
return _closeCrossButton;
|
||||
}
|
||||
}
|
||||
|
||||
//================================================================================================================================
|
||||
// Shuriken Toggle with label alignment fix
|
||||
static GUIStyle _shurikenToggle;
|
||||
public static GUIStyle ShurikenToggle
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_shurikenToggle == null)
|
||||
{
|
||||
_shurikenToggle = new GUIStyle("ShurikenToggle");
|
||||
_shurikenToggle.fontSize = 9;
|
||||
_shurikenToggle.contentOffset = new Vector2(16, -1);
|
||||
if(EditorGUIUtility.isProSkin)
|
||||
{
|
||||
var textColor = new Color(.8f, .8f, .8f);
|
||||
_shurikenToggle.normal.textColor = textColor;
|
||||
_shurikenToggle.active.textColor = textColor;
|
||||
_shurikenToggle.focused.textColor = textColor;
|
||||
_shurikenToggle.hover.textColor = textColor;
|
||||
_shurikenToggle.onNormal.textColor = textColor;
|
||||
_shurikenToggle.onActive.textColor = textColor;
|
||||
_shurikenToggle.onFocused.textColor = textColor;
|
||||
_shurikenToggle.onHover.textColor = textColor;
|
||||
}
|
||||
}
|
||||
return _shurikenToggle;
|
||||
}
|
||||
}
|
||||
|
||||
//================================================================================================================================
|
||||
// Bold mini-label (the one from EditorStyles isn't actually "mini")
|
||||
static GUIStyle _miniBoldLabel;
|
||||
public static GUIStyle MiniBoldLabel
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_miniBoldLabel == null)
|
||||
{
|
||||
_miniBoldLabel = new GUIStyle(EditorStyles.boldLabel);
|
||||
_miniBoldLabel.fontSize = 10;
|
||||
_miniBoldLabel.margin = new RectOffset(0, 0, 0, 0);
|
||||
}
|
||||
return _miniBoldLabel;
|
||||
}
|
||||
}
|
||||
|
||||
//================================================================================================================================
|
||||
// Bold mini-foldout
|
||||
static GUIStyle _miniBoldFoldout;
|
||||
public static GUIStyle MiniBoldFoldout
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_miniBoldFoldout == null)
|
||||
{
|
||||
_miniBoldFoldout = new GUIStyle(EditorStyles.foldout);
|
||||
_miniBoldFoldout.fontSize = 10;
|
||||
_miniBoldFoldout.fontStyle = FontStyle.Bold;
|
||||
_miniBoldFoldout.margin = new RectOffset(0, 0, 0, 0);
|
||||
}
|
||||
return _miniBoldFoldout;
|
||||
}
|
||||
}
|
||||
|
||||
//================================================================================================================================
|
||||
// Gray right-aligned label for Orderable List (Material Animator)
|
||||
static GUIStyle _PropertyTypeLabel;
|
||||
public static GUIStyle PropertyTypeLabel
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_PropertyTypeLabel == null)
|
||||
{
|
||||
_PropertyTypeLabel = new GUIStyle(EditorStyles.label);
|
||||
_PropertyTypeLabel.alignment = TextAnchor.MiddleRight;
|
||||
_PropertyTypeLabel.normal.textColor = Color.gray;
|
||||
_PropertyTypeLabel.fontSize = 9;
|
||||
}
|
||||
return _PropertyTypeLabel;
|
||||
}
|
||||
}
|
||||
|
||||
// Dark Gray right-aligned label for Orderable List (Material Animator)
|
||||
static GUIStyle _PropertyTypeLabelFocused;
|
||||
public static GUIStyle PropertyTypeLabelFocused
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_PropertyTypeLabelFocused == null)
|
||||
{
|
||||
_PropertyTypeLabelFocused = new GUIStyle(EditorStyles.label);
|
||||
_PropertyTypeLabelFocused.alignment = TextAnchor.MiddleRight;
|
||||
_PropertyTypeLabelFocused.normal.textColor = new Color(.2f, .2f, .2f);
|
||||
_PropertyTypeLabelFocused.fontSize = 9;
|
||||
}
|
||||
return _PropertyTypeLabelFocused;
|
||||
}
|
||||
}
|
||||
|
||||
//================================================================================================================================
|
||||
// Rounded Box
|
||||
static GUIStyle _roundedBox;
|
||||
public static GUIStyle RoundedBox
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_roundedBox == null)
|
||||
{
|
||||
_roundedBox = new GUIStyle(EditorStyles.helpBox);
|
||||
}
|
||||
return _roundedBox;
|
||||
}
|
||||
}
|
||||
|
||||
//================================================================================================================================
|
||||
// Center White Label ("Editing Spline" label in Scene View)
|
||||
static GUIStyle _CenteredWhiteLabel;
|
||||
public static GUIStyle CenteredWhiteLabel
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_CenteredWhiteLabel == null)
|
||||
{
|
||||
_CenteredWhiteLabel = new GUIStyle(EditorStyles.centeredGreyMiniLabel);
|
||||
_CenteredWhiteLabel.fontSize = 20;
|
||||
_CenteredWhiteLabel.normal.textColor = Color.white;
|
||||
}
|
||||
return _CenteredWhiteLabel;
|
||||
}
|
||||
}
|
||||
|
||||
//================================================================================================================================
|
||||
// Used to draw lines for separators
|
||||
static public GUIStyle _LineStyle;
|
||||
static public GUIStyle LineStyle
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_LineStyle == null)
|
||||
{
|
||||
_LineStyle = new GUIStyle();
|
||||
_LineStyle.normal.background = EditorGUIUtility.whiteTexture;
|
||||
_LineStyle.stretchWidth = true;
|
||||
}
|
||||
|
||||
return _LineStyle;
|
||||
}
|
||||
}
|
||||
|
||||
//================================================================================================================================
|
||||
// HelpBox with rich text formatting support
|
||||
static GUIStyle _HelpBoxRichTextStyle;
|
||||
static public GUIStyle HelpBoxRichTextStyle
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_HelpBoxRichTextStyle == null)
|
||||
{
|
||||
_HelpBoxRichTextStyle = new GUIStyle("HelpBox");
|
||||
_HelpBoxRichTextStyle.richText = true;
|
||||
}
|
||||
return _HelpBoxRichTextStyle;
|
||||
}
|
||||
}
|
||||
|
||||
//================================================================================================================================
|
||||
// Material Blue Header
|
||||
static public GUIStyle _MaterialHeaderStyle;
|
||||
static public GUIStyle MaterialHeaderStyle
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_MaterialHeaderStyle == null)
|
||||
{
|
||||
_MaterialHeaderStyle = new GUIStyle(EditorStyles.label);
|
||||
_MaterialHeaderStyle.fontStyle = FontStyle.Bold;
|
||||
_MaterialHeaderStyle.fontSize = 11;
|
||||
_MaterialHeaderStyle.padding.top = 0;
|
||||
_MaterialHeaderStyle.padding.bottom = 0;
|
||||
_MaterialHeaderStyle.normal.textColor = EditorGUIUtility.isProSkin ? new Color32(75, 128, 255, 255) : new Color32(0, 50, 230, 255);
|
||||
_MaterialHeaderStyle.stretchWidth = true;
|
||||
}
|
||||
|
||||
return _MaterialHeaderStyle;
|
||||
}
|
||||
}
|
||||
|
||||
//================================================================================================================================
|
||||
// Material Header emboss effect
|
||||
static public GUIStyle _MaterialHeaderStyleHighlight;
|
||||
static public GUIStyle MaterialHeaderStyleHighlight
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_MaterialHeaderStyleHighlight == null)
|
||||
{
|
||||
_MaterialHeaderStyleHighlight = new GUIStyle(MaterialHeaderStyle);
|
||||
_MaterialHeaderStyleHighlight.contentOffset = new Vector2(1, 1);
|
||||
_MaterialHeaderStyleHighlight.normal.textColor = EditorGUIUtility.isProSkin ? new Color32(255, 255, 255, 16) : new Color32(255, 255, 255, 32);
|
||||
}
|
||||
|
||||
return _MaterialHeaderStyleHighlight;
|
||||
}
|
||||
}
|
||||
|
||||
//================================================================================================================================
|
||||
// Filled rectangle
|
||||
|
||||
static private GUIStyle _WhiteRectangleStyle;
|
||||
|
||||
static public void DrawRectangle(Rect position, Color color)
|
||||
{
|
||||
var col = GUI.color;
|
||||
GUI.color *= color;
|
||||
DrawRectangle(position);
|
||||
GUI.color = col;
|
||||
}
|
||||
static public void DrawRectangle(Rect position)
|
||||
{
|
||||
if(_WhiteRectangleStyle == null)
|
||||
{
|
||||
_WhiteRectangleStyle = new GUIStyle();
|
||||
_WhiteRectangleStyle.normal.background = EditorGUIUtility.whiteTexture;
|
||||
}
|
||||
|
||||
if(Event.current != null && Event.current.type == EventType.Repaint)
|
||||
{
|
||||
_WhiteRectangleStyle.Draw(position, false, false, false, false);
|
||||
}
|
||||
}
|
||||
|
||||
//================================================================================================================================
|
||||
// Methods
|
||||
//================================================================================================================================
|
||||
|
||||
static public void DrawLine(float height = 2f)
|
||||
{
|
||||
DrawLine(Color.black, height);
|
||||
}
|
||||
static public void DrawLine(Color color, float height = 1f)
|
||||
{
|
||||
Rect position = GUILayoutUtility.GetRect(0f, float.MaxValue, height, height, LineStyle);
|
||||
DrawLine(position, color);
|
||||
}
|
||||
static public void DrawLine(Rect position, Color color)
|
||||
{
|
||||
if(Event.current.type == EventType.Repaint)
|
||||
{
|
||||
Color orgColor = GUI.color;
|
||||
GUI.color = orgColor * color;
|
||||
LineStyle.Draw(position, false, false, false, false);
|
||||
GUI.color = orgColor;
|
||||
}
|
||||
}
|
||||
|
||||
static public void MaterialDrawHeader(GUIContent guiContent)
|
||||
{
|
||||
var rect = GUILayoutUtility.GetRect(guiContent, MaterialHeaderStyle);
|
||||
GUI.Label(rect, guiContent, MaterialHeaderStyleHighlight);
|
||||
GUI.Label(rect, guiContent, MaterialHeaderStyle);
|
||||
}
|
||||
|
||||
static public void MaterialDrawSeparator()
|
||||
{
|
||||
GUILayout.Space(4);
|
||||
if(EditorGUIUtility.isProSkin)
|
||||
DrawLine(new Color(.3f, .3f, .3f, 1f), 1);
|
||||
else
|
||||
DrawLine(new Color(.6f, .6f, .6f, 1f), 1);
|
||||
GUILayout.Space(4);
|
||||
}
|
||||
|
||||
static public void MaterialDrawSeparatorDouble()
|
||||
{
|
||||
GUILayout.Space(6);
|
||||
if(EditorGUIUtility.isProSkin)
|
||||
{
|
||||
DrawLine(new Color(.1f, .1f, .1f, 1f), 1);
|
||||
DrawLine(new Color(.4f, .4f, .4f, 1f), 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawLine(new Color(.3f, .3f, .3f, 1f), 1);
|
||||
DrawLine(new Color(.9f, .9f, .9f, 1f), 1);
|
||||
}
|
||||
GUILayout.Space(6);
|
||||
}
|
||||
|
||||
//built-in console icons, also used in help box
|
||||
static Texture2D warnIcon;
|
||||
static Texture2D infoIcon;
|
||||
static Texture2D errorIcon;
|
||||
|
||||
static public void HelpBoxRichText(Rect position, string message, MessageType msgType)
|
||||
{
|
||||
Texture2D icon = null;
|
||||
switch(msgType)
|
||||
{
|
||||
case MessageType.Warning: icon = warnIcon ?? (warnIcon = EditorGUIUtility.Load("console.warnicon") as Texture2D); break;
|
||||
case MessageType.Info: icon = infoIcon ?? (infoIcon = EditorGUIUtility.Load("console.infoicon") as Texture2D); break;
|
||||
case MessageType.Error: icon = errorIcon ?? (errorIcon = EditorGUIUtility.Load("console.erroricon") as Texture2D); break;
|
||||
}
|
||||
EditorGUI.LabelField(position, GUIContent.none, new GUIContent(message, icon), HelpBoxRichTextStyle);
|
||||
}
|
||||
|
||||
static public void HelpBoxRichText(string message, MessageType msgType)
|
||||
{
|
||||
Texture2D icon = null;
|
||||
switch(msgType)
|
||||
{
|
||||
case MessageType.Warning: icon = warnIcon ?? (warnIcon = EditorGUIUtility.Load("console.warnicon") as Texture2D); break;
|
||||
case MessageType.Info: icon = infoIcon ?? (infoIcon = EditorGUIUtility.Load("console.infoicon") as Texture2D); break;
|
||||
case MessageType.Error: icon = errorIcon ?? (errorIcon = EditorGUIUtility.Load("console.erroricon") as Texture2D); break;
|
||||
}
|
||||
EditorGUILayout.LabelField(GUIContent.none, new GUIContent(message, icon), HelpBoxRichTextStyle);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 26306333afc273640814fd7a7b3968e0
|
||||
timeCreated: 1501149213
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 109565
|
||||
packageName: Cartoon FX Remaster Free
|
||||
packageVersion: R 1.5.0
|
||||
assetPath: Assets/JMO Assets/Cartoon FX Remaster/CFXR Assets/Editor/CFXR_Styles.cs
|
||||
uploadId: 756876
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ae70c5d833aa6d74e9429910c18b70c6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,113 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: cfxr aura rays hdr ab nosp
|
||||
m_Shader: {fileID: -6465566751694194690, guid: 1a29b4d27eb8b04479ef89c00dea533d,
|
||||
type: 3}
|
||||
m_ValidKeywords:
|
||||
- _ALPHABLEND_ON
|
||||
- _CFXR_HDR_BOOST
|
||||
- _CFXR_SINGLE_CHANNEL
|
||||
m_InvalidKeywords:
|
||||
- _
|
||||
- _CFXR_DITHERED_SHADOWS_OFF
|
||||
- _CFXR_OVERLAYBLEND_RGBA
|
||||
- _CFXR_OVERLAYTEX_OFF
|
||||
m_LightmapFlags: 0
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DissolveTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DistortTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DitherCustom:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 4ece64fbaa1a3d14091abf505199104e, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OverlayTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SecondColorTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BacklightTransmittance: 1
|
||||
- _BlendingType: 0
|
||||
- _BumpScale: 1
|
||||
- _CFXR_DITHERED_SHADOWS: 0
|
||||
- _CFXR_OVERLAYBLEND: 0
|
||||
- _CFXR_OVERLAYTEX: 0
|
||||
- _Cutoff: 0.1
|
||||
- _DirLightScreenAtten: 1
|
||||
- _DirectLightingRamp: 1
|
||||
- _DissolveSmooth: 0.1
|
||||
- _Distort: 0.1
|
||||
- _DoubleDissolve: 0
|
||||
- _DstBlend: 10
|
||||
- _EdgeFadePow: 1
|
||||
- _FadeAlongU: 0
|
||||
- _HdrBoost: 1
|
||||
- _HdrMultiply: 2
|
||||
- _IndirectLightingMix: 0.5
|
||||
- _InvertDissolveTex: 0
|
||||
- _LightingWorldPosStrength: 0.2
|
||||
- _OVERLAYBLEND: 0
|
||||
- _OVERLAYTEX: 0
|
||||
- _SecondColorSmooth: 0.2
|
||||
- _ShadowStrength: 1
|
||||
- _SingleChannel: 1
|
||||
- _SoftParticlesFadeDistanceFar: 1
|
||||
- _SoftParticlesFadeDistanceNear: 0
|
||||
- _SrcBlend: 5
|
||||
- _UVDistortionAdd: 0
|
||||
- _UseAlphaClip: 0
|
||||
- _UseBackLighting: 0
|
||||
- _UseDissolve: 0
|
||||
- _UseDissolveOffsetUV: 0
|
||||
- _UseEF: 0
|
||||
- _UseEmission: 0
|
||||
- _UseFB: 0
|
||||
- _UseFontColor: 0
|
||||
- _UseLighting: 0
|
||||
- _UseLightingWorldPosOffset: 0
|
||||
- _UseNormalMap: 0
|
||||
- _UseSP: 0
|
||||
- _UseSecondColor: 0
|
||||
- _UseUV2Distortion: 0
|
||||
- _UseUVDistortion: 0
|
||||
- _ZWrite: 0
|
||||
m_Colors:
|
||||
- _Color: {r: 4.237095, g: 4.237095, b: 4.237095, a: 1}
|
||||
- _DissolveScroll: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _DistortScrolling: {r: 0, g: 0, b: 1, a: 1}
|
||||
- _OverlayTex_Scroll: {r: 0.1, g: 0.1, b: 1, a: 1}
|
||||
- _ShadowColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SoftParticlesFadeDistance: {r: 0, g: 1, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 59b66e1956031654985c136e6927a7d8
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 109565
|
||||
packageName: Cartoon FX Remaster Free
|
||||
packageVersion: R 1.5.0
|
||||
assetPath: Assets/JMO Assets/Cartoon FX Remaster/CFXR Assets/Graphics/cfxr aura
|
||||
rays hdr ab nosp.mat
|
||||
uploadId: 756876
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 86 KiB |
@@ -0,0 +1,129 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4ece64fbaa1a3d14091abf505199104e
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 9
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 0
|
||||
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: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
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: 2
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 10
|
||||
textureShape: 1
|
||||
singleChannelComponent: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 2
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 256
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 256
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: Android
|
||||
maxTextureSize: 256
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 64
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 63
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 109565
|
||||
packageName: Cartoon FX Remaster Free
|
||||
packageVersion: R 1.5.0
|
||||
assetPath: Assets/JMO Assets/Cartoon FX Remaster/CFXR Assets/Graphics/cfxr aura
|
||||
rays.png
|
||||
uploadId: 756876
|
||||
@@ -0,0 +1,113 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: cfxr aura runic hdr ab nosp
|
||||
m_Shader: {fileID: -6465566751694194690, guid: 1a29b4d27eb8b04479ef89c00dea533d,
|
||||
type: 3}
|
||||
m_ValidKeywords:
|
||||
- _ALPHABLEND_ON
|
||||
- _CFXR_HDR_BOOST
|
||||
- _CFXR_SINGLE_CHANNEL
|
||||
m_InvalidKeywords:
|
||||
- _
|
||||
- _CFXR_DITHERED_SHADOWS_OFF
|
||||
- _CFXR_OVERLAYBLEND_RGBA
|
||||
- _CFXR_OVERLAYTEX_OFF
|
||||
m_LightmapFlags: 0
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DissolveTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DistortTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DitherCustom:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: ccb58def4933d4e46b7a1fc023bf6259, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OverlayTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SecondColorTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BacklightTransmittance: 1
|
||||
- _BlendingType: 0
|
||||
- _BumpScale: 1
|
||||
- _CFXR_DITHERED_SHADOWS: 0
|
||||
- _CFXR_OVERLAYBLEND: 0
|
||||
- _CFXR_OVERLAYTEX: 0
|
||||
- _Cutoff: 0.1
|
||||
- _DirLightScreenAtten: 1
|
||||
- _DirectLightingRamp: 1
|
||||
- _DissolveSmooth: 0.1
|
||||
- _Distort: 0.1
|
||||
- _DoubleDissolve: 0
|
||||
- _DstBlend: 10
|
||||
- _EdgeFadePow: 1
|
||||
- _FadeAlongU: 0
|
||||
- _HdrBoost: 1
|
||||
- _HdrMultiply: 2
|
||||
- _IndirectLightingMix: 0.5
|
||||
- _InvertDissolveTex: 0
|
||||
- _LightingWorldPosStrength: 0.2
|
||||
- _OVERLAYBLEND: 0
|
||||
- _OVERLAYTEX: 0
|
||||
- _SecondColorSmooth: 0.2
|
||||
- _ShadowStrength: 1
|
||||
- _SingleChannel: 1
|
||||
- _SoftParticlesFadeDistanceFar: 1
|
||||
- _SoftParticlesFadeDistanceNear: 0
|
||||
- _SrcBlend: 5
|
||||
- _UVDistortionAdd: 0
|
||||
- _UseAlphaClip: 0
|
||||
- _UseBackLighting: 0
|
||||
- _UseDissolve: 0
|
||||
- _UseDissolveOffsetUV: 0
|
||||
- _UseEF: 0
|
||||
- _UseEmission: 0
|
||||
- _UseFB: 0
|
||||
- _UseFontColor: 0
|
||||
- _UseLighting: 0
|
||||
- _UseLightingWorldPosOffset: 0
|
||||
- _UseNormalMap: 0
|
||||
- _UseSP: 0
|
||||
- _UseSecondColor: 0
|
||||
- _UseUV2Distortion: 0
|
||||
- _UseUVDistortion: 0
|
||||
- _ZWrite: 0
|
||||
m_Colors:
|
||||
- _Color: {r: 4.237095, g: 4.237095, b: 4.237095, a: 1}
|
||||
- _DissolveScroll: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _DistortScrolling: {r: 0, g: 0, b: 1, a: 1}
|
||||
- _OverlayTex_Scroll: {r: 0.1, g: 0.1, b: 1, a: 1}
|
||||
- _ShadowColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SoftParticlesFadeDistance: {r: 0, g: 1, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cbb6f419bbe7c6e4d9ce7e0322aa267d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 109565
|
||||
packageName: Cartoon FX Remaster Free
|
||||
packageVersion: R 1.5.0
|
||||
assetPath: Assets/JMO Assets/Cartoon FX Remaster/CFXR Assets/Graphics/cfxr aura
|
||||
runic hdr ab nosp.mat
|
||||
uploadId: 756876
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 101 KiB |
@@ -0,0 +1,129 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ccb58def4933d4e46b7a1fc023bf6259
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 9
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 0
|
||||
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: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
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: 2
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 10
|
||||
textureShape: 1
|
||||
singleChannelComponent: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 2
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 256
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 256
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: Android
|
||||
maxTextureSize: 256
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 64
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 63
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 109565
|
||||
packageName: Cartoon FX Remaster Free
|
||||
packageVersion: R 1.5.0
|
||||
assetPath: Assets/JMO Assets/Cartoon FX Remaster/CFXR Assets/Graphics/cfxr aura
|
||||
runic.png
|
||||
uploadId: 756876
|
||||
@@ -0,0 +1,125 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: cfxr blood dissolve ab
|
||||
m_Shader: {fileID: -6465566751694194690, guid: 1a29b4d27eb8b04479ef89c00dea533d,
|
||||
type: 3}
|
||||
m_ValidKeywords:
|
||||
- _ALPHABLEND_ON
|
||||
- _CFXR_DISSOLVE
|
||||
- _CFXR_DITHERED_SHADOWS_ON
|
||||
- _FADING_ON
|
||||
m_InvalidKeywords:
|
||||
- _
|
||||
- _CFXR_OVERLAYBLEND_RGBA
|
||||
- _CFXR_OVERLAYTEX_OFF
|
||||
- _CFXR_SINGLE_CHANNEL
|
||||
- _SINGLECHANNEL_ON
|
||||
m_LightmapFlags: 0
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DissolveTex:
|
||||
m_Texture: {fileID: 2800000, guid: 0611efd272757c345a8ded5f38dd3f88, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DistortTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DitherCustom:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _GradientMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: a29f55dbea218ca4fbd94deb36027aee, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OverlayTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SecondColorTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AmbientColor: 0.25
|
||||
- _AmbientIntensity: 0.5
|
||||
- _AmbientLighting: 0
|
||||
- _BacklightTransmittance: 1
|
||||
- _BlendingType: 0
|
||||
- _BumpScale: 1
|
||||
- _CFXR_DITHERED_SHADOWS: 1
|
||||
- _CFXR_OVERLAYBLEND: 0
|
||||
- _CFXR_OVERLAYTEX: 0
|
||||
- _Cutoff: 0.1
|
||||
- _DebugDissolveTime: 0
|
||||
- _DirLightScreenAtten: 1
|
||||
- _DirectLightingRamp: 1
|
||||
- _DissolveSmooth: 0.1
|
||||
- _Distort: 0.1
|
||||
- _DoubleDissolve: 0
|
||||
- _DstBlend: 10
|
||||
- _EdgeFadePow: 1
|
||||
- _FadeAlongU: 0
|
||||
- _HdrBoost: 0
|
||||
- _HdrMultiply: 0
|
||||
- _IndirectLightingMix: 0.5
|
||||
- _InvertDissolveTex: 0
|
||||
- _LightingWorldPosStrength: 0.2
|
||||
- _OVERLAYBLEND: 0
|
||||
- _OVERLAYTEX: 0
|
||||
- _ReceivedShadowsStrength: 0.5
|
||||
- _SecondColorSmooth: 0.2
|
||||
- _ShadowStrength: 0.5
|
||||
- _SingleChannel: 1
|
||||
- _SoftParticlesFadeDistanceFar: 1
|
||||
- _SoftParticlesFadeDistanceNear: 0
|
||||
- _SrcBlend: 5
|
||||
- _UVDistortionAdd: 0
|
||||
- _UseAlphaClip: 0
|
||||
- _UseBackLighting: 0
|
||||
- _UseDissolve: 1
|
||||
- _UseDissolveOffsetUV: 0
|
||||
- _UseEF: 0
|
||||
- _UseEmission: 0
|
||||
- _UseFB: 0
|
||||
- _UseFontColor: 0
|
||||
- _UseGradientMap: 0
|
||||
- _UseLighting: 0
|
||||
- _UseLightingWorldPosOffset: 0
|
||||
- _UseNormalMap: 0
|
||||
- _UseSP: 1
|
||||
- _UseSecondColor: 0
|
||||
- _UseUV2Distortion: 0
|
||||
- _UseUVDistortion: 0
|
||||
- _ZWrite: 0
|
||||
m_Colors:
|
||||
- _Color: {r: 2, g: 2, b: 2, a: 1}
|
||||
- _DissolveScroll: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _DistortScrolling: {r: 0, g: 0, b: 1, a: 1}
|
||||
- _OverlayTex_Scroll: {r: 0.1, g: 0.1, b: 1, a: 1}
|
||||
- _ShadowColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SoftParticlesFadeDistance: {r: 0, g: 1, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 28dde998c7abf234498a42d0aab38421
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 109565
|
||||
packageName: Cartoon FX Remaster Free
|
||||
packageVersion: R 1.5.0
|
||||
assetPath: Assets/JMO Assets/Cartoon FX Remaster/CFXR Assets/Graphics/cfxr blood
|
||||
dissolve ab.mat
|
||||
uploadId: 756876
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 244 KiB |
@@ -0,0 +1,129 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0611efd272757c345a8ded5f38dd3f88
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 9
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 0
|
||||
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: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
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: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 10
|
||||
textureShape: 1
|
||||
singleChannelComponent: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 2
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 256
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 256
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: Android
|
||||
maxTextureSize: 256
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 256
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 63
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 109565
|
||||
packageName: Cartoon FX Remaster Free
|
||||
packageVersion: R 1.5.0
|
||||
assetPath: Assets/JMO Assets/Cartoon FX Remaster/CFXR Assets/Graphics/cfxr blood
|
||||
dissolve.png
|
||||
uploadId: 756876
|
||||
@@ -0,0 +1,127 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: cfxr blood splash dissolve ab
|
||||
m_Shader: {fileID: -6465566751694194690, guid: 1a29b4d27eb8b04479ef89c00dea533d,
|
||||
type: 3}
|
||||
m_ValidKeywords:
|
||||
- _ALPHABLEND_ON
|
||||
- _CFXR_DISSOLVE
|
||||
- _CFXR_DITHERED_SHADOWS_ON
|
||||
- _FADING_ON
|
||||
m_InvalidKeywords:
|
||||
- _
|
||||
- _CFXR_OVERLAYBLEND_RGBA
|
||||
- _CFXR_OVERLAYTEX_OFF
|
||||
- _CFXR_SINGLE_CHANNEL
|
||||
- _SINGLECHANNEL_ON
|
||||
m_LightmapFlags: 0
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DissolveTex:
|
||||
m_Texture: {fileID: 2800000, guid: 66389432937edf24a943c3944a78bd01, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DistortTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DitherCustom:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _GradientMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: b00dc0b0f4174b14aa9e3caa8d9b0859, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OverlayTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SecondColorTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AmbientColor: 0.25
|
||||
- _AmbientIntensity: 0.5
|
||||
- _AmbientLighting: 0
|
||||
- _BacklightTransmittance: 1
|
||||
- _BlendingType: 0
|
||||
- _BumpScale: 1
|
||||
- _CFXR_DITHERED_SHADOWS: 1
|
||||
- _CFXR_OVERLAYBLEND: 0
|
||||
- _CFXR_OVERLAYTEX: 0
|
||||
- _Cutoff: 0.1
|
||||
- _DebugDissolveTime: 0
|
||||
- _DirLightScreenAtten: 1
|
||||
- _DirectLightingMix: 0.5
|
||||
- _DirectLightingRamp: 1
|
||||
- _DissolveSmooth: 0.1
|
||||
- _Distort: 0.1
|
||||
- _DoubleDissolve: 0
|
||||
- _DstBlend: 10
|
||||
- _EdgeFadePow: 1
|
||||
- _FadeAlongU: 0
|
||||
- _HdrBoost: 0
|
||||
- _HdrMultiply: 0
|
||||
- _IndirectLightingMix: 0.5
|
||||
- _InvertDissolveTex: 0
|
||||
- _LightingWorldPosStrength: 0.2
|
||||
- _OVERLAYBLEND: 0
|
||||
- _OVERLAYTEX: 0
|
||||
- _ReceivedShadowsStrength: 0.5
|
||||
- _SecondColorSmooth: 0.2
|
||||
- _ShadowStrength: 0.5
|
||||
- _SingleChannel: 1
|
||||
- _SoftParticlesFadeDistanceFar: 1
|
||||
- _SoftParticlesFadeDistanceNear: 0
|
||||
- _SrcBlend: 5
|
||||
- _UVDistortionAdd: 0
|
||||
- _UseAlphaClip: 0
|
||||
- _UseBackLighting: 0
|
||||
- _UseDissolve: 1
|
||||
- _UseDissolveOffsetUV: 0
|
||||
- _UseEF: 0
|
||||
- _UseEmission: 0
|
||||
- _UseFB: 0
|
||||
- _UseFontColor: 0
|
||||
- _UseGradientMap: 0
|
||||
- _UseLighting: 0
|
||||
- _UseLightingWorldPosOffset: 0
|
||||
- _UseNormalMap: 0
|
||||
- _UseSP: 1
|
||||
- _UseSecondColor: 0
|
||||
- _UseUV2Distortion: 0
|
||||
- _UseUVDistortion: 0
|
||||
- _ZWrite: 0
|
||||
m_Colors:
|
||||
- _Color: {r: 2, g: 2, b: 2, a: 1}
|
||||
- _DissolveScroll: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _DistortScrolling: {r: 0, g: 0, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _OverlayTex_Scroll: {r: 0.1, g: 0.1, b: 1, a: 1}
|
||||
- _ShadowColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SoftParticlesFadeDistance: {r: 0, g: 1, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ccfff22ed954c6f41ade040a8a7c8f22
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 109565
|
||||
packageName: Cartoon FX Remaster Free
|
||||
packageVersion: R 1.5.0
|
||||
assetPath: Assets/JMO Assets/Cartoon FX Remaster/CFXR Assets/Graphics/cfxr blood
|
||||
splash dissolve ab.mat
|
||||
uploadId: 756876
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 146 KiB |
@@ -0,0 +1,129 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 66389432937edf24a943c3944a78bd01
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 9
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 0
|
||||
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: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
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: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 10
|
||||
textureShape: 1
|
||||
singleChannelComponent: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 2
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: Android
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 63
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 109565
|
||||
packageName: Cartoon FX Remaster Free
|
||||
packageVersion: R 1.5.0
|
||||
assetPath: Assets/JMO Assets/Cartoon FX Remaster/CFXR Assets/Graphics/cfxr blood
|
||||
splash dissolve.png
|
||||
uploadId: 756876
|
||||
@@ -0,0 +1,162 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!43 &4300000
|
||||
Mesh:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: cfxr blood splash mesh
|
||||
serializedVersion: 9
|
||||
m_SubMeshes:
|
||||
- serializedVersion: 2
|
||||
firstByte: 0
|
||||
indexCount: 201
|
||||
topology: 0
|
||||
baseVertex: 0
|
||||
firstVertex: 0
|
||||
vertexCount: 69
|
||||
localAABB:
|
||||
m_Center: {x: -0.001953125, y: 0.005859375, z: 0}
|
||||
m_Extent: {x: 0.45117188, y: 0.48632812, z: 0}
|
||||
m_Shapes:
|
||||
vertices: []
|
||||
shapes: []
|
||||
channels: []
|
||||
fullWeights: []
|
||||
m_BindPose: []
|
||||
m_BoneNameHashes:
|
||||
m_RootBoneNameHash: 0
|
||||
m_MeshCompression: 0
|
||||
m_IsReadable: 1
|
||||
m_KeepVertices: 1
|
||||
m_KeepIndices: 1
|
||||
m_IndexFormat: 0
|
||||
m_IndexBuffer: 2c001d000f000f003b002c002c002b001d001d0010000f000f0003003b003b003a002c002b001e001d001d001c0010000f0004000300030002003b003a002d002c002b002a001e001c001b0010000f000e00040002003c003b003a002e002d002a001f001e001b00110010000e000d000400020041003c003a0033002e002a0024001f001b00150011000d000500040002000100410041003d003c003a003700330033002f002e002a0028002400240020001f001b00190015001500120011000d000900050001004300410041003f003d003a0039003700370035003300330031002f002800260024002400220020001900170015001500140012000d000b000900090007000500010044004300430042004100410040003f003f003e003d00390038003700370036003500350034003300330032003100310030002f002a00290028002800270026002600250024002400230022002200210020001b001a0019001900180017001700160015001400130012000d000c000b000b000a000900090008000700070006000500010000004400
|
||||
m_VertexData:
|
||||
serializedVersion: 2
|
||||
m_VertexCount: 69
|
||||
m_Channels:
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 3
|
||||
- stream: 0
|
||||
offset: 12
|
||||
format: 0
|
||||
dimension: 3
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 24
|
||||
format: 0
|
||||
dimension: 2
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
m_DataSize: 2208
|
||||
_typelessdata: 0000bc3e0000aebe000000000000000000000000000080bf00005e3f0000243e00008a3e000078be000000000000000000000000000080bf0000453f0000843e0000183e0000f0bd000000000000000000000000000080bf0000263f0000c43e0000043e000098bd000000000000000000000000000080bf0000213f0000da3e0000083e000080bb000000000000000000000000000080bf0000223f0000fe3e0000383e0000103d000000000000000000000000ffff7fbf00002e3f0000093f0000a23e0000a83d000000000000000000000000000080bf0000513f0000153f0000da3e0000043e000000000000000000000000000080bf00006d3f0000213f0000e63e00001c3e000000000000000000000000000080bf0000733f0000273f0000e63e0000503e000000000000000000000000000080bf0000733f0000343f0000e43e00006c3e000000000000000000000000000080bf0000723f00003b3f0000d43e00007c3e000000000000000000000000000080bf00006a3f00003f3f0000c03e00007c3e000000000000000000000000000080bf0000603f00003f3f0000a03e0000603e000000000000000000000000000080bf0000503f0000383f00004c3e0000103e000000000000000000000000000080bf0000333f0000243f0000f03d0000d03d000000000000000000000000ffff7fbf00001e3f00001a3f0000883d0000e03d000000000000000000000000000080bf0000113f00001c3f0000203d0000243e000000000000000000000000000080bf00000a3f0000293f0000e03c0000743e000000000000000000000000000080bf0000073f00003d3f0000a03c0000dc3e000000000000000000000000000080bf0000053f00006e3f0000003c0000ee3e000000000000000000000000000080bf0000023f0000773f0000a0bc0000fa3e000000000000000000000000000080bf0000f63e00007d3f0000c0bc0000fc3e000000000000000000000000000080bf0000f43e00007e3f0000a0bd0000fc3e000000000000000000000000000080bf0000d83e00007e3f0000d8bd0000e83e000000000000000000000000ffff7fbf0000ca3e0000743f0000d0bd0000c83e000000000000000000000000000080bf0000cc3e0000643f0000b8bd0000a43e000000000000000000000000000080bf0000d23e0000523f000090bd0000883e000000000000000000000000000080bf0000dc3e0000443f000070bd0000203e000000000000000000000000000080bf0000e23e0000283f000088bd0000003e000000000000000000000000000080bf0000de3e0000203f0000c8bd0000d03d000000000000000000000000000080bf0000ce3e00001a3f000014be0000d83d000000000000000000000000000080bf0000b63e00001b3f000038be0000043e000000000000000000000000000080bf0000a43e0000213f0000a6be0000703e000000000000000000000000000080bf0000343e00003c3f0000b6be0000803e000000000000000000000000000080bf0000143e0000403f0000c4be0000803e000000000000000000000000000080bf0000f03d0000403f0000d2be0000683e000000000000000000000000000080bf0000b83d00003a3f0000d6be0000543e000000000000000000000000000080bf0000a83d0000353f0000d6be0000343e000000000000000000000000000080bf0000a83d00002d3f0000cabe0000183e000000000000000000000000000080bf0000d83d0000263f0000c0be0000083e000000000000000000000000000080bf0000003e0000223f0000a2be0000d83d000000000000000000000000000080bf00003c3e00001b3f00006cbe0000a03d000000000000000000000000000080bf00008a3e0000143f000024be0000303d000000000000000000000000000080bf0000ae3e00000b3f000004be0000003c000000000000000000000000000080bf0000be3e0000023f000010be000070bd000000000000000000000000000080bf0000b83e0000e23e000030be0000c0bd000000000000000000000000000080bf0000a83e0000d03e000086be00001cbe000000000000000000000000000080bf0000743e0000b23e0000babe000058be000000000000000000000000000080bf00000c3e0000943e0000d4be00007cbe000000000000000000000000000080bf0000b03d0000823e0000e2be00008cbe000000000000000000000000000080bf0000703d0000683e0000e8be000098be000000000000000000000000000080bf0000403d0000503e0000e8be0000a6be000000000000000000000000000080bf0000403d0000343e0000e4be0000b4be000000000000000000000000ffff7fbf0000603d0000183e0000ccbe0000c6be000000000000000000000000000080bf0000d03d0000e83d0000b4be0000c4be000000000000000000000000000080bf0000183e0000f03d0000a4be0000b8be000000000000000000000000000080bf0000383e0000103e000080be000096be000000000000000000000000000080bf0000803e0000543e000008be000028be000000000000000000000000ffff7fbf0000bc3e0000ac3e000020bd0000d8bd000000000000000000000000000080bf0000ec3e0000ca3e0000a03d000020be000000000000000000000000000080bf0000143f0000b03e0000243e000094be000000000000000000000000000080bf0000293f0000583e0000643e0000cebe000000000000000000000000000080bf0000393f0000c83d00007c3e0000e2be000000000000000000000000ffff7fbf00003f3f0000703d0000963e0000f6be000000000000000000000000000080bf00004b3f0000a03c0000ae3e0000f6be000000000000000000000000000080bf0000573f0000a03c0000b83e0000f2be000000000000000000000000000080bf00005c3f0000e03c0000cc3e0000dcbe000000000000000000000000000080bf0000663f0000903d0000ca3e0000c0be000000000000000000000000000080bf0000653f0000003e
|
||||
m_CompressedMesh:
|
||||
m_Vertices:
|
||||
m_NumItems: 0
|
||||
m_Range: 0
|
||||
m_Start: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_UV:
|
||||
m_NumItems: 0
|
||||
m_Range: 0
|
||||
m_Start: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_Normals:
|
||||
m_NumItems: 0
|
||||
m_Range: 0
|
||||
m_Start: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_Tangents:
|
||||
m_NumItems: 0
|
||||
m_Range: 0
|
||||
m_Start: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_Weights:
|
||||
m_NumItems: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_NormalSigns:
|
||||
m_NumItems: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_TangentSigns:
|
||||
m_NumItems: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_FloatColors:
|
||||
m_NumItems: 0
|
||||
m_Range: 0
|
||||
m_Start: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_BoneIndices:
|
||||
m_NumItems: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_Triangles:
|
||||
m_NumItems: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_UVInfo: 0
|
||||
m_LocalAABB:
|
||||
m_Center: {x: -0.001953125, y: 0.005859375, z: 0}
|
||||
m_Extent: {x: 0.45117188, y: 0.48632812, z: 0}
|
||||
m_MeshUsageFlags: 0
|
||||
m_BakedConvexCollisionMesh:
|
||||
m_BakedTriangleCollisionMesh:
|
||||
m_MeshMetrics[0]: 1
|
||||
m_MeshMetrics[1]: 1
|
||||
m_MeshOptimized: 0
|
||||
m_StreamData:
|
||||
offset: 0
|
||||
size: 0
|
||||
path:
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 03b90fa8ed1d4104abc8b7431ab290e6
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 4300000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 109565
|
||||
packageName: Cartoon FX Remaster Free
|
||||
packageVersion: R 1.5.0
|
||||
assetPath: Assets/JMO Assets/Cartoon FX Remaster/CFXR Assets/Graphics/cfxr blood
|
||||
splash mesh.asset
|
||||
uploadId: 756876
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 45 KiB |
@@ -0,0 +1,129 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b00dc0b0f4174b14aa9e3caa8d9b0859
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 9
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 0
|
||||
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: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
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: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 10
|
||||
textureShape: 1
|
||||
singleChannelComponent: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 2
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 256
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 256
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: Android
|
||||
maxTextureSize: 256
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 256
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 63
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 109565
|
||||
packageName: Cartoon FX Remaster Free
|
||||
packageVersion: R 1.5.0
|
||||
assetPath: Assets/JMO Assets/Cartoon FX Remaster/CFXR Assets/Graphics/cfxr blood
|
||||
splash.png
|
||||
uploadId: 756876
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 87 KiB |
@@ -0,0 +1,128 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a29f55dbea218ca4fbd94deb36027aee
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 9
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 0
|
||||
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: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
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: 10
|
||||
textureShape: 1
|
||||
singleChannelComponent: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 2
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 256
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 256
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: Android
|
||||
maxTextureSize: 256
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 256
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 63
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 109565
|
||||
packageName: Cartoon FX Remaster Free
|
||||
packageVersion: R 1.5.0
|
||||
assetPath: Assets/JMO Assets/Cartoon FX Remaster/CFXR Assets/Graphics/cfxr blood.png
|
||||
uploadId: 756876
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user