浏览代码

First Startup Fixes / Better handling GameManager Editor Default Events / Removed unused HDRPLensFlare (p4#4375)

/main
Thomas ICHÉ 5 年前
当前提交
ad8085ba
共有 12 个文件被更改,包括 209 次插入111 次删除
  1. 49
      Assets/Scenes/MainMenu/MainMenu.unity
  2. 142
      Assets/Scenes/Spaceship/Spaceship.unity
  3. 6
      LocalPackages/net.peeweek.gameplay-ingredients/Editor/Discover/DiscoverWindow.cs
  4. 8
      LocalPackages/net.peeweek.gameplay-ingredients/Editor/HierarchyHints/HierarchyHints.cs
  5. 2
      LocalPackages/net.peeweek.gameplay-ingredients/Editor/WelcomeScreen/WelcomeScreen.Setup.cs
  6. 20
      LocalPackages/net.peeweek.gameplay-ingredients/Editor/WelcomeScreen/WelcomeScreen.cs
  7. 33
      LocalPackages/net.peeweek.gameplay-ingredients/Editor/GameplayIngredientsAssetPostprocessor.cs
  8. 11
      LocalPackages/net.peeweek.gameplay-ingredients/Editor/GameplayIngredientsAssetPostprocessor.cs.meta
  9. 30
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/GameManagerSendStartupMessageAction.cs
  10. 11
      LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/GameManagerSendStartupMessageAction.cs.meta
  11. 8
      Assets/Shaders/LensFlare.meta

49
Assets/Scenes/MainMenu/MainMenu.unity


m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 901.5, y: 224, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Children:
- {fileID: 1007847414}
m_RootOrder: 1
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &51828756
MonoBehaviour:

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &320949438
GameObject:

- {fileID: 766918343}
- {fileID: 945829390}
m_Father: {fileID: 0}
m_RootOrder: 5
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &356800339
GameObject:

m_Children:
- {fileID: 1645168103}
m_Father: {fileID: 0}
m_RootOrder: 7
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &514851504
PrefabInstance:

- {fileID: 1978832911}
- {fileID: 1424590210}
m_Father: {fileID: 0}
m_RootOrder: 2
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}

m_GameObject: {fileID: 1007847410}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c68adda9532fd8043b281736d2a5fbcf, type: 3}
m_Script: {fileID: 11500000, guid: 15ae69d69e7aeaf4fbfb02e7175ed5f5, type: 3}
Name: Send GAME_MANAGER_MAINMENU_START
MessageToSend: GAME_MANAGER_MAINMENU_START
Name: Send MainMenu Start
messageType: 0
--- !u!114 &1007847412
MonoBehaviour:
m_ObjectHideFlags: 0

m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1007847410}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 1.1855906, y: -0.969415, z: 2.2625837}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -900.3144, y: -224.96942, z: 2.2625837}
m_Father: {fileID: 0}
m_Father: {fileID: 51828755}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1063000315

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 6
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1175080659
MonoBehaviour:

propertyPath: m_Name
value: DisableOnConsole
objectReference: {fileID: 0}
- target: {fileID: 1525667865134529129, guid: 7032562b6942e724cb3c1db0fe904b11,
type: 3}
propertyPath: Calls.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1525667865134529129, guid: 7032562b6942e724cb3c1db0fe904b11,
type: 3}
propertyPath: Calls.Array.data[0]
value:
objectReference: {fileID: 1326174470}
- target: {fileID: 7862324043835442194, guid: 7032562b6942e724cb3c1db0fe904b11,
type: 3}
propertyPath: m_LocalPosition.x

propertyPath: m_LocalScale.z
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1525667865134529129, guid: 7032562b6942e724cb3c1db0fe904b11,
type: 3}
propertyPath: Calls.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1525667865134529129, guid: 7032562b6942e724cb3c1db0fe904b11,
type: 3}
propertyPath: Calls.Array.data[0]
value:
objectReference: {fileID: 1326174470}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 7032562b6942e724cb3c1db0fe904b11, type: 3}
--- !u!4 &1326174468 stripped

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1523513660
GameObject:

142
Assets/Scenes/Spaceship/Spaceship.unity


onTriggerExit: []
OnlyInteractWithTag: 1
Tag: Player
--- !u!114 &807199882
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: a81bcacc415a1f743bfdf703afc52027, type: 3}
m_Name:
m_EditorClassIdentifier:
active: 1
m_AdvancedMode: 0
rotation:
m_OverrideState: 0
m_Value: 0
min: 0
max: 360
skyIntensityMode:
m_OverrideState: 0
m_Value: 0
exposure:
m_OverrideState: 0
m_Value: 0
multiplier:
m_OverrideState: 0
m_Value: 1
min: 0
upperHemisphereLuxValue:
m_OverrideState: 0
m_Value: 1
min: 0
desiredLuxValue:
m_OverrideState: 0
m_Value: 20000
updateMode:
m_OverrideState: 0
m_Value: 0
updatePeriod:
m_OverrideState: 0
m_Value: 0
min: 0
includeSunInBaking:
m_OverrideState: 0
m_Value: 0
top:
m_OverrideState: 0
m_Value: {r: 0, g: 0, b: 0, a: 1}
hdr: 1
showAlpha: 0
showEyeDropper: 1
middle:
m_OverrideState: 0
m_Value: {r: 0, g: 0, b: 0, a: 1}
hdr: 1
showAlpha: 0
showEyeDropper: 1
bottom:
m_OverrideState: 0
m_Value: {r: 0, g: 0, b: 0, a: 1}
hdr: 1
showAlpha: 0
showEyeDropper: 1
gradientDiffusion:
m_OverrideState: 0
m_Value: 1
--- !u!1 &911525341
GameObject:
m_ObjectHideFlags: 0

m_GameObject: {fileID: 968423113}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c68adda9532fd8043b281736d2a5fbcf, type: 3}
m_Script: {fileID: 11500000, guid: 15ae69d69e7aeaf4fbfb02e7175ed5f5, type: 3}
Name: Send DEMO_START
MessageToSend: GAME_MANAGER_GAME_START
Name: Send Demo Start
messageType: 1
--- !u!114 &968423116
MonoBehaviour:
m_ObjectHideFlags: 0

onTriggerExit: []
OnlyInteractWithTag: 1
Tag: Player
--- !u!114 &1064080859
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: a81bcacc415a1f743bfdf703afc52027, type: 3}
m_Name:
m_EditorClassIdentifier:
active: 1
m_AdvancedMode: 0
rotation:
m_OverrideState: 0
m_Value: 0
min: 0
max: 360
skyIntensityMode:
m_OverrideState: 0
m_Value: 0
exposure:
m_OverrideState: 0
m_Value: 0
multiplier:
m_OverrideState: 0
m_Value: 1
min: 0
upperHemisphereLuxValue:
m_OverrideState: 0
m_Value: 1
min: 0
desiredLuxValue:
m_OverrideState: 0
m_Value: 20000
updateMode:
m_OverrideState: 0
m_Value: 0
updatePeriod:
m_OverrideState: 0
m_Value: 0
min: 0
includeSunInBaking:
m_OverrideState: 0
m_Value: 0
top:
m_OverrideState: 0
m_Value: {r: 0, g: 0, b: 0, a: 1}
hdr: 1
showAlpha: 0
showEyeDropper: 1
middle:
m_OverrideState: 0
m_Value: {r: 0, g: 0, b: 0, a: 1}
hdr: 1
showAlpha: 0
showEyeDropper: 1
bottom:
m_OverrideState: 0
m_Value: {r: 0, g: 0, b: 0, a: 1}
hdr: 1
showAlpha: 0
showEyeDropper: 1
gradientDiffusion:
m_OverrideState: 0
m_Value: 1
--- !u!1 &1071627952
GameObject:
m_ObjectHideFlags: 0

m_EditorClassIdentifier:
m_Profile: {fileID: 11400000, guid: ce53d71596d5cce49a16a425f3e2be04, type: 2}
m_StaticLightingSkyUniqueID: 3
m_SkySettings: {fileID: 1064080859}
m_SkySettings: {fileID: 807199882}
m_SkySettingsFromProfile: {fileID: 4137289007277416816, guid: ce53d71596d5cce49a16a425f3e2be04,
type: 2}
--- !u!1 &1086405685

6
LocalPackages/net.peeweek.gameplay-ingredients/Editor/Discover/DiscoverWindow.cs


if (value != GetShowOnStartup(name)) EditorPrefs.SetBool($"{name}.ShowAtStartup", value);
}
public static void Reload()
{
EditorApplication.update -= ShowAtStartup;
s_StartupDiscoverAssets = null;
InitShowAtStartup();
}
[InitializeOnLoadMethod]
static void InitShowAtStartup()

8
LocalPackages/net.peeweek.gameplay-ingredients/Editor/HierarchyHints/HierarchyHints.cs


{
EditorApplication.hierarchyWindowItemOnGUI -= HierarchyOnGUI;
EditorApplication.hierarchyWindowItemOnGUI += HierarchyOnGUI;
foreach (var kvp in s_Definitions)
{
Contents.AddIcon(kvp.Key, kvp.Value);
}
}
static Dictionary<Type, string> s_Definitions = new Dictionary<Type, string>()

public static GUIContent GetContent(Type t)
{
if (!s_Icons.ContainsKey(t) && s_Definitions.ContainsKey(t))
AddIcon(t,s_Definitions[t]);
return s_Icons[t];
}
}

2
LocalPackages/net.peeweek.gameplay-ingredients/Editor/WelcomeScreen/WelcomeScreen.Setup.cs


}
const string kSettingsAssetPath = "Assets/Resources/GameplayIngredientsSettings.asset";
public const string kSettingsAssetPath = "Assets/Resources/GameplayIngredientsSettings.asset";
static void SettingAssetPage()
{

20
LocalPackages/net.peeweek.gameplay-ingredients/Editor/WelcomeScreen/WelcomeScreen.cs


set { if (value != showOnStartup) EditorPrefs.SetBool(kShowOnStartupPreference, value); }
}
static readonly Texture2D header = (Texture2D)EditorGUIUtility.Load("Packages/net.peeweek.gameplay-ingredients/Editor/WelcomeScreen/welcome-title.png");
static Texture2D header
{
get
{
if (s_Header == null)
s_Header = (Texture2D)EditorGUIUtility.Load("Packages/net.peeweek.gameplay-ingredients/Editor/WelcomeScreen/welcome-title.png");
return s_Header;
}
}
static Texture2D s_Header;
public static void Reload()
{
EditorApplication.update -= ShowAtStartup;
InitShowAtStartup();
}
[InitializeOnLoadMethod]
static void InitShowAtStartup()

}
static void ShowAtStartup()

33
LocalPackages/net.peeweek.gameplay-ingredients/Editor/GameplayIngredientsAssetPostprocessor.cs


using System.Linq;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace GameplayIngredients.Editor
{
public class GameplayIngredientsAssetPostprocessor : AssetPostprocessor
{
static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
{
if (importedAssets.Contains(WelcomeScreen.kSettingsAssetPath))
{
Debug.Log("Imported GameplayIngredientsSettings");
WelcomeScreen.Reload();
}
string[] allDiscovery = AssetDatabase.FindAssets("t:DiscoverAsset");
bool needDiscoveryReload = false;
foreach(var guid in allDiscovery)
{
string path = AssetDatabase.GUIDToAssetPath(guid);
if(importedAssets.Contains(path))
{
needDiscoveryReload = true;
break;
}
}
if (needDiscoveryReload)
DiscoverWindow.Reload();
}
}
}

11
LocalPackages/net.peeweek.gameplay-ingredients/Editor/GameplayIngredientsAssetPostprocessor.cs.meta


fileFormatVersion: 2
guid: a13118b22a04c0d4d95bb500a88e59ab
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

30
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/GameManagerSendStartupMessageAction.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace GameplayIngredients.Actions
{
public class GameManagerSendStartupMessageAction : ActionBase
{
public enum MessageType
{
MainMenuStart,
GameLevelStart,
}
public MessageType messageType;
public override void Execute(GameObject instigator = null)
{
switch(messageType)
{
case MessageType.GameLevelStart:
Messager.Send(GameManager.GameLevelStartMessage);
break;
case MessageType.MainMenuStart:
Messager.Send(GameManager.MainMenuStartMessage);
break;
}
}
}
}

11
LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/GameManagerSendStartupMessageAction.cs.meta


fileFormatVersion: 2
guid: 15ae69d69e7aeaf4fbfb02e7175ed5f5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 2800000, guid: af9148c7de0fc6444b7e4e050f116dd0, type: 3}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Shaders/LensFlare.meta


fileFormatVersion: 2
guid: ccc0d51af9b31634da865022db9f80cb
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存