浏览代码

Small Fixes + Icon / Ability to disable the GPI Welcome screen in settings

/main
peeweek 6 年前
当前提交
0fe5a105
共有 11 个文件被更改,包括 286 次插入5 次删除
  1. 16
      Editor/Discover/DiscoverAsset.cs
  2. 2
      Editor/Discover/DiscoverAsset.cs.meta
  3. 7
      Editor/WelcomeScreen/WelcomeScreen.cs
  4. 2
      Runtime/Discover/Discover.cs.meta
  5. 7
      Runtime/Settings/GameplayIngredientsSettings.cs
  6. 8
      Icons/Discover.meta
  7. 9
      Icons/Discover/Discover Icon.png
  8. 90
      Icons/Discover/Discover Icon.png.meta
  9. 60
      Icons/Discover/DiscoverAsset Icon.png
  10. 90
      Icons/Discover/DiscoverAsset Icon.png.meta

16
Editor/Discover/DiscoverAsset.cs


using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
namespace GameplayIngredients.Editor
{

static void Create()
{
AssetFactory.CreateAssetInProjectWindow<DiscoverAsset>(null, "New DiscoverAsset");
AssetFactory.CreateAssetInProjectWindow<DiscoverAsset>(null, "New DiscoverAsset.asset");
}
[OnOpenAsset]
static bool OpenAsset(int instanceID, int line)
{
var asset = EditorUtility.InstanceIDToObject(instanceID);
if (asset is DiscoverAsset)
{
DiscoverWindow.ShowDiscoverWindow(asset as DiscoverAsset);
return true;
}
else
return false;
}
[Header("General Properties")]

2
Editor/Discover/DiscoverAsset.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 2800000, guid: e61da4d7fe9ddd647bd4fd18999ff0f0, type: 3}
userData:
assetBundleName:
assetBundleVariant:

7
Editor/WelcomeScreen/WelcomeScreen.cs


[InitializeOnLoadMethod]
static void InitShowAtStartup()
{
if (showOnStartup)
if (showOnStartup && !GameplayIngredientsSettings.currentSettings.disableWelcomeScreenAutoStart)
EditorApplication.update += ShowAtStartup;
}

EditorGUI.DrawRect(line, Color.black);
using (new GUILayout.HorizontalScope())
{
showOnStartup = GUILayout.Toggle(showOnStartup, " Show this window on startup");
if(!GameplayIngredientsSettings.currentSettings.disableWelcomeScreenAutoStart)
{
showOnStartup = GUILayout.Toggle(showOnStartup, " Show this window on startup");
}
GUILayout.FlexibleSpace();
if (GUILayout.Button("Close"))
{

2
Runtime/Discover/Discover.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 2800000, guid: d3aa34dcc051ec64aac5ea3204d61966, type: 3}
userData:
assetBundleName:
assetBundleVariant:

7
Runtime/Settings/GameplayIngredientsSettings.cs


{
public string[] excludedeManagers { get { return m_ExcludedManagers; } }
public bool verboseCalls { get { return m_VerboseCalls; } }
public bool disableWelcomeScreenAutoStart { get { return m_DisableWelcomeScreenAutoStart; } }
[BoxGroup("Editor")]
[SerializeField]
protected bool m_DisableWelcomeScreenAutoStart;
[BoxGroup("Callables")]
[SerializeField, InfoBox("Verbose Calls enable logging at runtime, this can lead to performance drop, use only when debugging.",InfoBoxType.Warning, "m_VerboseCalls")]
protected bool m_VerboseCalls;

var defaultAsset = CreateInstance<GameplayIngredientsSettings>();
defaultAsset.m_VerboseCalls = false;
defaultAsset.m_ExcludedManagers = new string[0];
defaultAsset.m_DisableWelcomeScreenAutoStart = false;
return defaultAsset;
}
}

8
Icons/Discover.meta


fileFormatVersion: 2
guid: 89ab41c779f435b49808c7980a59cbb2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

9
Icons/Discover/Discover Icon.png

之前 之后
宽度: 72  |  高度: 72  |  大小: 1.6 KiB

90
Icons/Discover/Discover Icon.png.meta


fileFormatVersion: 2
guid: d3aa34dcc051ec64aac5ea3204d61966
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
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: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

60
Icons/Discover/DiscoverAsset Icon.png

之前 之后
宽度: 192  |  高度: 192  |  大小: 7.7 KiB

90
Icons/Discover/DiscoverAsset Icon.png.meta


fileFormatVersion: 2
guid: e61da4d7fe9ddd647bd4fd18999ff0f0
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
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: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存