[Add] Ultimate Preview
This commit is contained in:
+33
@@ -0,0 +1,33 @@
|
||||
using UnityEditor.AssetImporters;
|
||||
using VoxelLabs.UltimatePreview.Shared;
|
||||
|
||||
namespace VoxelLabs.UltimatePreview
|
||||
{
|
||||
public class AssetImporterEditorBase : AssetImporterEditor
|
||||
{
|
||||
public object[] containers = null;
|
||||
|
||||
#if UNITY_2022_2_OR_NEWER
|
||||
protected override void ResetValues() => DiscardChanges();
|
||||
|
||||
public override void DiscardChanges()
|
||||
{
|
||||
base.DiscardChanges();
|
||||
if (containers == null)
|
||||
return;
|
||||
foreach (object container in containers)
|
||||
ReflectionUtils.ResetValuesMethodInfo?.Invoke(container, null);
|
||||
}
|
||||
#else
|
||||
protected override void ResetValues()
|
||||
{
|
||||
base.ResetValues();
|
||||
|
||||
if (containers == null)
|
||||
return;
|
||||
foreach (object container in containers)
|
||||
ReflectionUtils.ResetValuesMethodInfo?.Invoke(container, null);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6832db56aaff4e139b1091cb64615d6c
|
||||
timeCreated: 1753804490
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 322974
|
||||
packageName: "Ultimate Preview Window \u2013 Pro Edition"
|
||||
packageVersion: 1.3.1
|
||||
assetPath: Assets/Voxel Labs/Ultimate Preview/Editor/Scripts/Lib/AssetImporterEditorBase.cs
|
||||
uploadId: 861890
|
||||
@@ -0,0 +1,9 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace VoxelLabs.UltimatePreview
|
||||
{
|
||||
public class Constants : MonoBehaviour
|
||||
{
|
||||
public static readonly string ULTIMATE_PREVIEW_VERSION_NUMBER = "v1.3.1";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 57ab0765734087b429f6b586d5d2bcb2
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 322974
|
||||
packageName: "Ultimate Preview Window \u2013 Pro Edition"
|
||||
packageVersion: 1.3.1
|
||||
assetPath: Assets/Voxel Labs/Ultimate Preview/Editor/Scripts/Lib/Constants.cs
|
||||
uploadId: 861890
|
||||
@@ -0,0 +1,26 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using UnityEditor;
|
||||
|
||||
[assembly: InternalsVisibleTo("VoxelLabs.UltimatePreview.Core")]
|
||||
|
||||
namespace VoxelLabs.UltimatePreview
|
||||
{
|
||||
public abstract class ObjectPreviewBase : ObjectPreview
|
||||
{
|
||||
public ObjectPreviewBase()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
internal abstract void Dispose();
|
||||
|
||||
#if UNITY_2021_1_OR_NEWER
|
||||
public override void Cleanup()
|
||||
{
|
||||
base.Cleanup();
|
||||
|
||||
Dispose();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7db4ed275fcd4b1987e4dd6c3da74fdf
|
||||
timeCreated: 1756308080
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 322974
|
||||
packageName: "Ultimate Preview Window \u2013 Pro Edition"
|
||||
packageVersion: 1.3.1
|
||||
assetPath: Assets/Voxel Labs/Ultimate Preview/Editor/Scripts/Lib/ObjectPreviewBase.cs
|
||||
uploadId: 861890
|
||||
@@ -0,0 +1,27 @@
|
||||
namespace VoxelLabs.UltimatePreview
|
||||
{
|
||||
public static class Utils
|
||||
{
|
||||
public static int GetEditorVersionIdentifier()
|
||||
{
|
||||
#if UNITY_2022_2_OR_NEWER
|
||||
return 2022_2;
|
||||
#elif UNITY_2021_3_OR_NEWER
|
||||
return 2021_3;
|
||||
#elif UNITY_2021_1_OR_NEWER
|
||||
return 2021_1;
|
||||
#elif UNITY_2018_4_OR_NEWER
|
||||
return 2018_4;
|
||||
#endif
|
||||
}
|
||||
|
||||
public static bool GetVerbosity()
|
||||
{
|
||||
#if ULTIMATE_PREVIEW_VERBOSE
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9c395717b13a45f7addd0eb3ae7f882b
|
||||
timeCreated: 1753813913
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 322974
|
||||
packageName: "Ultimate Preview Window \u2013 Pro Edition"
|
||||
packageVersion: 1.3.1
|
||||
assetPath: Assets/Voxel Labs/Ultimate Preview/Editor/Scripts/Lib/Utils.cs
|
||||
uploadId: 861890
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "VoxelLabs.UltimatePreview.Lib",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:c98d06bf67fbf344893ff49cb62779e2"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eee97d8d6772d904786a1b8ef0ce222d
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 322974
|
||||
packageName: "Ultimate Preview Window \u2013 Pro Edition"
|
||||
packageVersion: 1.3.1
|
||||
assetPath: Assets/Voxel Labs/Ultimate Preview/Editor/Scripts/Lib/VoxelLabs.UltimatePreview.Lib.asmdef
|
||||
uploadId: 861890
|
||||
Reference in New Issue
Block a user