chore: initial commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
/// ---------------------------------------------
|
||||
/// Behavior Designer
|
||||
/// Copyright (c) Opsive. All Rights Reserved.
|
||||
/// https://www.opsive.com
|
||||
/// ---------------------------------------------
|
||||
namespace Opsive.BehaviorDesigner.Editor.Managers
|
||||
{
|
||||
using Opsive.Shared.Editor.Managers;
|
||||
|
||||
/// <summary>
|
||||
/// Draws a list of all of the available add-ons.
|
||||
/// </summary>
|
||||
[OrderedEditorItem("Add-Ons", 12)]
|
||||
public class AddOnsManager : Opsive.Shared.Editor.Managers.AddOnsManager
|
||||
{
|
||||
protected override string AddOnsURL => "https://opsive.com/asset/BehaviorDesigner/AddOnsList.txt";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cdcf33bfa5dc24248a6152f89300f0c2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,19 @@
|
||||
/// ---------------------------------------------
|
||||
/// Behavior Designer
|
||||
/// Copyright (c) Opsive. All Rights Reserved.
|
||||
/// https://www.opsive.com
|
||||
/// ---------------------------------------------
|
||||
namespace Opsive.BehaviorDesigner.Editor.Managers
|
||||
{
|
||||
/// <summary>
|
||||
/// Static class defining information about the asset.
|
||||
/// </summary>
|
||||
public static class AssetInfo
|
||||
{
|
||||
public static string Version { get => "2.1.12"; }
|
||||
|
||||
public static string Name { get => "Behavior Designer Pro"; }
|
||||
|
||||
public static string PackageName => "com.opsive.behaviordesigner";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fa07a5b0e063044478181a6a40bf038e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,68 @@
|
||||
/// ---------------------------------------------
|
||||
/// Behavior Designer
|
||||
/// Copyright (c) Opsive. All Rights Reserved.
|
||||
/// https://www.opsive.com
|
||||
/// ---------------------------------------------
|
||||
namespace Opsive.BehaviorDesigner.Editor.Managers
|
||||
{
|
||||
using Opsive.Shared.Editor.Managers;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// The MainManagerWindow is an editor window which contains all of the sub managers. This window draws the high level menu options and draws
|
||||
/// the selected sub manager.
|
||||
/// </summary>
|
||||
[InitializeOnLoad]
|
||||
public class BehaviorMainWindow : MainManagerWindow
|
||||
{
|
||||
protected override string AssetName => AssetInfo.Name;
|
||||
protected override string AssetVersion => AssetInfo.Version;
|
||||
protected override string UpdateCheckURL => string.Format("https://opsive.com/asset/UpdateCheck.php?asset=BehaviorDesigner&type={0}&version={1}&unityversion={2}&devplatform={3}&targetplatform={4}",
|
||||
AssetInfo.Name.Replace(" ", ""), AssetInfo.Version, Application.unityVersion, Application.platform, EditorUserBuildSettings.activeBuildTarget);
|
||||
protected override string LatestVersionKey => "Opsive.BehaviorDesigner.Editor.LatestVersion";
|
||||
protected override string LastUpdateCheckKey => "Opsive.BehaviorDesigner.Editor.LastUpdateCheck";
|
||||
protected override string ManagerNamespace => "Opsive.BehaviorDesigner.Editor";
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the Main Manager.
|
||||
/// </summary>
|
||||
[MenuItem("Tools/Opsive/Behavior Designer/Welcome", false, 30)]
|
||||
public static MainManagerWindow ShowWindow()
|
||||
{
|
||||
var window = EditorWindow.GetWindow<BehaviorMainWindow>(false, "Behavior Window");
|
||||
window.minSize = new Vector2(680, 670);
|
||||
return window;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the Main Manager and shows the Samples Manager.
|
||||
/// </summary>
|
||||
[MenuItem("Tools/Opsive/Behavior Designer/Samples", false, 31)]
|
||||
public static void ShowSamplesManagerWindow()
|
||||
{
|
||||
var window = ShowWindow();
|
||||
window.Open(typeof(SamplesManager));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the Main Manager and shows the Integrations Manager.
|
||||
/// </summary>
|
||||
[MenuItem("Tools/Opsive/Behavior Designer/Integrations", false, 32)]
|
||||
public static void ShowIntegrationsManagerWindow()
|
||||
{
|
||||
var window = ShowWindow();
|
||||
window.Open(typeof(IntegrationsManager));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the Main Manager and shows the Add-Ons Manager.
|
||||
/// </summary>
|
||||
[MenuItem("Tools/Opsive/Behavior Designer/Add-Ons", false, 33)]
|
||||
public static void ShowAddOnsManagerWindow()
|
||||
{
|
||||
var window = ShowWindow();
|
||||
window.Open(typeof(AddOnsManager));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7eb87493a412def42ab4459e90b63fad
|
||||
timeCreated: 1500568651
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 95d69bf54d5801d408dfe7e5f6aa0436
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 6.5 KiB |
@@ -0,0 +1,140 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d52eae9187aad5b41aff6dd60e49247a
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
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: 2
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.9 KiB |
@@ -0,0 +1,140 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 020153b61b65cf34f82ccc9b186cb700
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
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: 2
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,18 @@
|
||||
/// ---------------------------------------------
|
||||
/// Behavior Designer
|
||||
/// Copyright (c) Opsive. All Rights Reserved.
|
||||
/// https://www.opsive.com
|
||||
/// ---------------------------------------------
|
||||
namespace Opsive.BehaviorDesigner.Editor.Managers
|
||||
{
|
||||
using Opsive.Shared.Editor.Managers;
|
||||
|
||||
/// <summary>
|
||||
/// Draws a list of all of the available integrations.
|
||||
/// </summary>
|
||||
[OrderedEditorItem("Integrations", 11)]
|
||||
public class IntegrationsManager : Opsive.Shared.Editor.Managers.IntegrationsManager
|
||||
{
|
||||
protected override string IntegrationsURL => "https://opsive.com/asset/BehaviorDesigner/IntegrationsList.txt";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 722bac958cec61240b407653551d0dfc
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "Opsive.BehaviorDesigner.Editor.Managers",
|
||||
"rootNamespace": "Opsive.BehaviorDesigner.Editor.Managers",
|
||||
"references": [
|
||||
"GUID:734d92eba21c94caba915361bd5ac177",
|
||||
"GUID:e0cd26848372d4e5c891c569017e11f1",
|
||||
"GUID:bbb15c76beca87041af309d0035105a2",
|
||||
"GUID:27cb7fd045e5bb44f8c617ce69325b1d",
|
||||
"GUID:97a55b351d7460f4f87d2ad07066bf4e",
|
||||
"GUID:cf0567158f87e3c4c9be32bb870ec7b9"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [
|
||||
{
|
||||
"name": "com.unity.entities",
|
||||
"expression": "1.3.5",
|
||||
"define": "UNITY_ENTITIES"
|
||||
}
|
||||
],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d923cf8fc4ca8464bb84bcfbec68a2ff
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,24 @@
|
||||
/// ---------------------------------------------
|
||||
/// Behavior Designer
|
||||
/// Copyright (c) Opsive. All Rights Reserved.
|
||||
/// https://www.opsive.com
|
||||
/// ---------------------------------------------
|
||||
namespace Opsive.BehaviorDesigner.Editor.Managers
|
||||
{
|
||||
using Opsive.Shared.Editor.Managers;
|
||||
|
||||
/// <summary>
|
||||
/// Draws a list of all of the available samples.
|
||||
/// </summary>
|
||||
[OrderedEditorItem("Samples", 10)]
|
||||
public class SamplesManager :Manager
|
||||
{
|
||||
public override void BuildVisualElements()
|
||||
{
|
||||
ManagerUtility.ShowControlBox("Import Samples", "Imports the sample scenes. These scenes use the universal render pipeline.", null, "Import Samples", () =>
|
||||
{
|
||||
ManagerUtility.ImportSample(AssetInfo.PackageName);
|
||||
}, m_ManagerContentContainer, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3790a505de4b60244afbd23f13ead000
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,72 @@
|
||||
#if !OPSIVE_IMPORT_DEBUG
|
||||
/// ---------------------------------------------
|
||||
/// Behavior Designer
|
||||
/// Copyright (c) Opsive. All Rights Reserved.
|
||||
/// https://www.opsive.com
|
||||
/// ---------------------------------------------
|
||||
namespace Opsive.BehaviorDesigner.Editor.Managers
|
||||
{
|
||||
using Opsive.Shared.Editor.Import;
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// Shows the welcome screen and check for minimum installed packages.
|
||||
/// </summary>
|
||||
[InitializeOnLoad]
|
||||
public class Startup
|
||||
{
|
||||
private const string c_ImportStatusPath = "Assets/Opsive/ImportStatus.asset";
|
||||
|
||||
/// <summary>
|
||||
/// Perform editor checks as soon as the scripts are done compiling.
|
||||
/// </summary>
|
||||
static Startup()
|
||||
{
|
||||
EditorApplication.update += EditorStartup;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Show the editor window if it hasn't been shown before.
|
||||
/// </summary>
|
||||
private static void EditorStartup()
|
||||
{
|
||||
if (EditorApplication.isCompiling) {
|
||||
return;
|
||||
}
|
||||
|
||||
EditorApplication.update -= EditorStartup;
|
||||
AssetDatabase.Refresh();
|
||||
ImportStatus importStatus = null;
|
||||
var importStatusAssets = AssetDatabase.FindAssets("t:ImportStatus");
|
||||
if (importStatusAssets != null && importStatusAssets.Length > 0) {
|
||||
for (int i = 0; i < importStatusAssets.Length; ++i) {
|
||||
var path = AssetDatabase.GUIDToAssetPath(importStatusAssets[i]);
|
||||
if (string.IsNullOrEmpty(path)) {
|
||||
path = importStatusAssets[i];
|
||||
}
|
||||
importStatus = AssetDatabase.LoadAssetAtPath(path, typeof(ImportStatus)) as ImportStatus;
|
||||
if (importStatus != null) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (importStatus == null) {
|
||||
// The import status hasn't been created yet. Create it in the same location as the Opsive folder.
|
||||
importStatus = ScriptableObject.CreateInstance<ImportStatus>();
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(c_ImportStatusPath));
|
||||
AssetDatabase.CreateAsset(importStatus, c_ImportStatusPath);
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
|
||||
if (!importStatus.BehaviorWindowShown) {
|
||||
var window = BehaviorMainWindow.ShowWindow();
|
||||
window.Open(typeof(WelcomeScreenManager));
|
||||
importStatus.BehaviorWindowShown = true;
|
||||
EditorUtility.SetDirty(importStatus);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9075c8a032fa68945bf2d25260aa36ee
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,181 @@
|
||||
/// ---------------------------------------------
|
||||
/// Behavior Designer
|
||||
/// Copyright (c) Opsive. All Rights Reserved.
|
||||
/// https://www.opsive.com
|
||||
/// ---------------------------------------------
|
||||
namespace Opsive.BehaviorDesigner.Editor.Managers
|
||||
{
|
||||
using Opsive.Shared.Editor.Managers;
|
||||
using UnityEditor;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
/// <summary>
|
||||
/// Shows a starting window with useful links.
|
||||
/// </summary>
|
||||
[OrderedEditorItem("Welcome", 0)]
|
||||
public class WelcomeScreenManager : Opsive.Shared.Editor.Managers.WelcomeScreenManager
|
||||
{
|
||||
private const string c_GraphDesignerSymbol = "GRAPH_DESIGNER";
|
||||
private const string c_EditorTextureGUID = "d52eae9187aad5b41aff6dd60e49247a";
|
||||
private const string c_RepositoryTextureGUID = "020153b61b65cf34f82ccc9b186cb700";
|
||||
|
||||
private VisualElement m_EntityHelpBoxContainer;
|
||||
|
||||
/// <summary>
|
||||
/// The name of the asset.
|
||||
/// </summary>
|
||||
protected override string AssetName => AssetInfo.Name;
|
||||
|
||||
/// <summary>
|
||||
/// The version of the asset.
|
||||
/// </summary>
|
||||
protected override string AssetVersion => AssetInfo.Version;
|
||||
|
||||
/// <summary>
|
||||
/// Should the large documentation image be added?
|
||||
/// </summary>
|
||||
protected override bool AddLargeDocumentationImage => false;
|
||||
|
||||
/// <summary>
|
||||
/// Returns the URL for the documentation page.
|
||||
/// </summary>
|
||||
/// <returns>The URL for the documentation page.</returns>
|
||||
protected override string GetDocumentationURL()
|
||||
{
|
||||
return "https://opsive.com/support/documentation/behavior-designer-pro/";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the URL for the videos page.
|
||||
/// </summary>
|
||||
/// <returns>The URL for the videos page.</returns>
|
||||
protected override string GetVideosURL()
|
||||
{
|
||||
return "https://opsive.com/videos?pid=28276";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the URL for the asset page.
|
||||
/// </summary>
|
||||
/// <returns>The URL for the asset page.</returns>
|
||||
protected override string GetAssetURL()
|
||||
{
|
||||
return "https://assetstore.unity.com/packages/slug/298743";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks to ensure the required packages are installed.
|
||||
/// </summary>
|
||||
/// <param name="parent">The parent VisualElement.</param>
|
||||
protected override void AddHeader(VisualElement parent)
|
||||
{
|
||||
EditorApplication.update += CheckForEntities;
|
||||
|
||||
#if !UNITY_ENTITIES
|
||||
m_EntityHelpBoxContainer = ManagerUtility.AddHelpBox(parent, "Behavior Designer requires the Entities package. Press the button below to install.", HelpBoxMessageType.Error, "Install", (HelpBox helpbox, Button actionButton) =>
|
||||
{
|
||||
helpbox.text = "Installing the entities package. Unity will reimport after the package has been installed.\n\n" +
|
||||
"Restart Unity if you receive compiler errors after Unity has reimported.\n\n" +
|
||||
"Behavior Designer can be access from the Tools/Opsive/Behavior Designer/Editor menu.";
|
||||
helpbox.messageType = HelpBoxMessageType.Info;
|
||||
actionButton.SetEnabled(false);
|
||||
m_WelcomeLabel.style.display = DisplayStyle.None;
|
||||
|
||||
UnityEditor.PackageManager.Client.Add("com.unity.entities");
|
||||
});
|
||||
m_WelcomeLabel.style.display = DisplayStyle.None;
|
||||
#else
|
||||
base.AddHeader(parent);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks for the Entity package installation.
|
||||
/// </summary>
|
||||
private void CheckForEntities()
|
||||
{
|
||||
#if !GRAPH_DESIGNER && UNITY_ENTITIES
|
||||
AddSymbol(c_GraphDesignerSymbol);
|
||||
EditorApplication.update -= CheckForEntities;
|
||||
|
||||
if (m_EntityHelpBoxContainer != null) {
|
||||
m_EntityHelpBoxContainer.style.display = DisplayStyle.None;
|
||||
m_WelcomeLabel.style.display = DisplayStyle.Flex;
|
||||
}
|
||||
#elif GRAPH_DESIGNER
|
||||
if (m_EntityHelpBoxContainer != null) {
|
||||
m_EntityHelpBoxContainer.style.display = DisplayStyle.None;
|
||||
m_WelcomeLabel.style.display = DisplayStyle.Flex;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds the specified symbol to the compiler definitions.
|
||||
/// </summary>
|
||||
/// <param name="symbol">The symbol to add.</param>
|
||||
private static void AddSymbol(string symbol)
|
||||
{
|
||||
// Set on all available build targets.
|
||||
var buildTargets = System.Enum.GetValues(typeof(BuildTarget)) as BuildTarget[];
|
||||
foreach (var buildTarget in buildTargets) {
|
||||
if (buildTarget is BuildTarget.NoTarget) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var buildTargetGroup = BuildPipeline.GetBuildTargetGroup(buildTarget);
|
||||
if (!BuildPipeline.IsBuildTargetSupported(buildTargetGroup, buildTarget)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
#if UNITY_2023_1_OR_NEWER
|
||||
var namedBuildTarget = UnityEditor.Build.NamedBuildTarget.FromBuildTargetGroup(buildTargetGroup);
|
||||
var symbols = PlayerSettings.GetScriptingDefineSymbols(namedBuildTarget);
|
||||
#else
|
||||
var symbols = PlayerSettings.GetScriptingDefineSymbolsForGroup(buildTargetGroup);
|
||||
#endif
|
||||
if (symbols.Contains(symbol)) {
|
||||
continue;
|
||||
}
|
||||
symbols += (";" + symbol);
|
||||
#if UNITY_2023_1_OR_NEWER
|
||||
PlayerSettings.SetScriptingDefineSymbols(namedBuildTarget, symbols);
|
||||
#else
|
||||
PlayerSettings.SetScriptingDefineSymbolsForGroup(buildTargetGroup, symbols);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds the resource images to the parent element.
|
||||
/// </summary>
|
||||
/// <param name="parent">The parent that the images should be added to.</param>
|
||||
protected override void AddImages(VisualElement parent)
|
||||
{
|
||||
AddLargeImage(parent, c_EditorTextureGUID, () => {
|
||||
#if GRAPH_DESIGNER
|
||||
BehaviorDesignerWindow.ShowWindow();
|
||||
#else
|
||||
UnityEngine.Debug.LogError("Error: Unable to open the Behavior Designer window. Ensure the Entities package has been installed.");
|
||||
#endif
|
||||
});
|
||||
|
||||
// Documentation and Videos.
|
||||
AddImageRow(parent, c_SmallDocumentationTextureGUID, GetDocumentationURL(),
|
||||
c_VideosTextureGUID, GetVideosURL());
|
||||
|
||||
// Repository and Downloads.
|
||||
AddImageRow(parent, c_RepositoryTextureGUID, "https://opsive.com/assets/behavior-designer-pro-subscription",
|
||||
c_DownloadsTextureGUID, IntegrationsManager.GetDownloadsLink());
|
||||
|
||||
// Forum and Discord.
|
||||
AddImageRow(parent, c_ForumTextureGUID, "https://opsive.com/forum/",
|
||||
c_DiscordTextureGUID, "https://discord.gg/QX6VFgc");
|
||||
// Review and Showcase.
|
||||
AddImageRow(parent, c_ReviewTextureGUID, GetAssetURL(),
|
||||
c_ShowcaseTextureGUID, "https://opsive.com/showcase/");
|
||||
// Professional Services.
|
||||
AddImageRow(parent, c_ProfessionalServicesTextureGUID, "https://opsive.com", string.Empty, string.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5b1cb06d692d68543b5f50cb2c132e42
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user