浏览代码
First Startup Fixes / Better handling GameManager Editor Default Events / Removed unused HDRPLensFlare (p4#4375)
/main
First Startup Fixes / Better handling GameManager Editor Default Events / Removed unused HDRPLensFlare (p4#4375)
/main
Thomas ICHÉ
5 年前
当前提交
ad8085ba
共有 12 个文件被更改,包括 209 次插入 和 111 次删除
-
49Assets/Scenes/MainMenu/MainMenu.unity
-
142Assets/Scenes/Spaceship/Spaceship.unity
-
6LocalPackages/net.peeweek.gameplay-ingredients/Editor/Discover/DiscoverWindow.cs
-
8LocalPackages/net.peeweek.gameplay-ingredients/Editor/HierarchyHints/HierarchyHints.cs
-
2LocalPackages/net.peeweek.gameplay-ingredients/Editor/WelcomeScreen/WelcomeScreen.Setup.cs
-
20LocalPackages/net.peeweek.gameplay-ingredients/Editor/WelcomeScreen/WelcomeScreen.cs
-
33LocalPackages/net.peeweek.gameplay-ingredients/Editor/GameplayIngredientsAssetPostprocessor.cs
-
11LocalPackages/net.peeweek.gameplay-ingredients/Editor/GameplayIngredientsAssetPostprocessor.cs.meta
-
30LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/GameManagerSendStartupMessageAction.cs
-
11LocalPackages/net.peeweek.gameplay-ingredients/Runtime/LevelScripting/Actions/GameManagerSendStartupMessageAction.cs.meta
-
8Assets/Shaders/LensFlare.meta
|
|||
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(); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: a13118b22a04c0d4d95bb500a88e59ab |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
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; |
|||
} |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 15ae69d69e7aeaf4fbfb02e7175ed5f5 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {fileID: 2800000, guid: af9148c7de0fc6444b7e4e050f116dd0, type: 3} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: ccc0d51af9b31634da865022db9f80cb |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue