diff --git a/.gitignore b/.gitignore deleted file mode 100644 index ffd66e2..0000000 --- a/.gitignore +++ /dev/null @@ -1,82 +0,0 @@ -## Remove all ignored files from repo -# git rm -r --cached . -# git add . - -# This .gitignore file should be placed at the root of your Unity project directory -# -# Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore -# -/[Ll]ibrary/ -/[Tt]emp/ -/[Oo]bj/ -/[Bb]uild/ -/[Bb]uilds/ -/[Ll]ogs/ -/[Uu]ser[Ss]ettings/ - -# MemoryCaptures can get excessive in size. -# They also could contain extremely sensitive data -/[Mm]emoryCaptures/ - -# Recordings can get excessive in size -/[Rr]ecordings/ - -# Uncomment this line if you wish to ignore the asset store tools plugin -# /[Aa]ssets/AssetStoreTools* - -# Autogenerated Jetbrains Rider plugin -/[Aa]ssets/Plugins/Editor/JetBrains* - -# Visual Studio cache directory -.vs/ -.vsconfig -.vscode -.idea/ -# Gradle cache directory -.gradle/ - -# Autogenerated VS/MD/Consulo solution and project files -ExportedObj/ -.consulo/ -*.csproj -*.unityproj -*.sln -*.suo -*.tmp -*.user -*.userprefs -*.pidb -*.booproj -*.svd -*.pdb -*.mdb -*.opendb -*.VC.db - -# Unity3D generated meta files -*.pidb.meta -*.pdb.meta -*.mdb.meta - -# Unity3D generated file on crash reports -sysinfo.txt - -# Builds -/[Bb]uilds/ -/[Bb]uild/ -*.apk -*.aab -*.unitypackage -*.app - -# Crashlytics generated file -crashlytics-build.properties - -# Packed Addressables -/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* - -# Temporary auto-generated Android Assets -/[Aa]ssets/[Ss]treamingAssets/aa.meta -/[Aa]ssets/[Ss]treamingAssets/aa/* -# MacOS -*.DS_Store diff --git a/Assets/Editor.meta b/Assets/Editor.meta deleted file mode 100644 index 6ccfab0..0000000 --- a/Assets/Editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b781846549578462f807fd1e6a5cfab0 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Editor/PackageInfoGenerator.cs b/Assets/Editor/PackageInfoGenerator.cs deleted file mode 100644 index 07a225a..0000000 --- a/Assets/Editor/PackageInfoGenerator.cs +++ /dev/null @@ -1,115 +0,0 @@ -using System; -using System.IO; -using QuickEye.UIToolkit; -using UnityEditor; -using UnityEngine; - -namespace QuickEye.Editor -{ - internal class PackageInfoGenerator : AssetPostprocessor - { - private const string PackageManifestGuid = "9567f359ac77aee4c930ff2374f3d84e"; - private const string PackageInfoDirectoryName = "Packages/com.quickeye.ui-toolkit-plus/Runtime/"; - private static string PackageInfoNamespace => typeof(QAttribute).Namespace; - - private const string PackageInfoPath = PackageInfoDirectoryName + "PackageInfo.cs"; - private const string PackageInfoClassTemplate = @" -// auto-generated -namespace #NAMESPACE# -{ - internal static class PackageInfo - { - public const string Version = ""#VERSION#""; - public const string Name = ""#NAME#""; - public const string DisplayName = ""#DISPLAY_NAME#""; - } -} -"; - - private static string PackageManifestPath => AssetDatabase.GUIDToAssetPath(PackageManifestGuid); - - private static void OnPostprocessAllAssets(string[] _, string[] __, string[] ___, string[] ____) - { - if (!ShouldRegeneratePackageInfo(out var packageManifest)) - return; - GeneratePackageInfoScript(packageManifest); - } - - private static bool ShouldRegeneratePackageInfo(out PackageManifest manifest) - { - return TryGetPackageManifest(out manifest) && !IsPackageInfoUpToDate(manifest); - } - - private static bool TryGetPackageManifest(out PackageManifest manifest) - { - var jsonAsset = AssetDatabase.LoadAssetAtPath(PackageManifestPath); - if (jsonAsset == null) - { - Debug.LogWarning($"Can't find package manifest at: {PackageManifestPath}"); - manifest = null; - return false; - } - - manifest = PackageManifest.FromTextAsset(jsonAsset); - if (manifest == null) - { - Debug.LogError($"Can't deserialize manifest: {PackageManifestPath}"); - return false; - } - - return true; - } - - private static bool IsPackageInfoUpToDate(PackageManifest manifest) - { - if (!File.Exists(PackageInfoPath)) - return false; - var script = File.ReadAllText(PackageInfoPath); - return script.Contains($"\"{manifest.version}\"") - && script.Contains($"\"{manifest.name}\"") - && script.Contains($"\"{manifest.displayName}\""); - } - - private static void GeneratePackageInfoScript(PackageManifest manifest) - { - if (manifest == null) - throw new NullReferenceException("Package Manifest is null"); - - Directory.CreateDirectory(PackageInfoDirectoryName); - GenerateCSharpCode(manifest); - } - - private static void GenerateCSharpCode(PackageManifest manifest) - { - var content = PackageInfoClassTemplate - .Replace("#NAMESPACE#", PackageInfoNamespace) - .Replace("#VERSION#", manifest.version) - .Replace("#NAME#", manifest.name) - .Replace("#DISPLAY_NAME#", manifest.displayName); - - File.WriteAllText(PackageInfoPath, content); - PingFile(PackageInfoPath); - } - - private static void PingFile(string filePath) - { - AssetDatabase.ImportAsset(filePath); - var asset = AssetDatabase.LoadAssetAtPath(filePath); - EditorGUIUtility.PingObject(asset); - } - - [Serializable] - // package.json representation - private class PackageManifest - { - public string name; - public string displayName; - public string version; - - public static PackageManifest FromTextAsset(TextAsset asset) - { - return JsonUtility.FromJson(asset.text); - } - } - } -} \ No newline at end of file diff --git a/Assets/Editor/PackageInfoGenerator.cs.meta b/Assets/Editor/PackageInfoGenerator.cs.meta deleted file mode 100644 index d2a86a5..0000000 --- a/Assets/Editor/PackageInfoGenerator.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 691400feb3e4477abe5dd63f142066b3 -timeCreated: 1661863531 \ No newline at end of file diff --git a/Assets/Sandbox.meta b/Assets/Sandbox.meta deleted file mode 100644 index 4e0e4e3..0000000 --- a/Assets/Sandbox.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 27edd4de64c056e4eb19774fd733674e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Sandbox/CodeGen.meta b/Assets/Sandbox/CodeGen.meta deleted file mode 100644 index 69857fe..0000000 --- a/Assets/Sandbox/CodeGen.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 27c61c14669524a3aadf09d1555a3fc7 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Sandbox/CodeGen/Code.meta b/Assets/Sandbox/CodeGen/Code.meta deleted file mode 100644 index be7fde6..0000000 --- a/Assets/Sandbox/CodeGen/Code.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: dde35543a9f2044f291ddc42b2504313 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Sandbox/CodeGen/Code/SampleAsmdef.asmdef b/Assets/Sandbox/CodeGen/Code/SampleAsmdef.asmdef deleted file mode 100644 index 4b91798..0000000 --- a/Assets/Sandbox/CodeGen/Code/SampleAsmdef.asmdef +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "SampleAsmDefName", - "rootNamespace": "", - "references": [ - "GUID:9861c8596b4de1544a09a56d39ef2572" - ], - "includePlatforms": [], - "excludePlatforms": [], - "allowUnsafeCode": false, - "overrideReferences": false, - "precompiledReferences": [], - "autoReferenced": true, - "defineConstraints": [], - "versionDefines": [], - "noEngineReferences": false -} \ No newline at end of file diff --git a/Assets/Sandbox/CodeGen/Code/SampleAsmdef.asmdef.meta b/Assets/Sandbox/CodeGen/Code/SampleAsmdef.asmdef.meta deleted file mode 100644 index 5e60bca..0000000 --- a/Assets/Sandbox/CodeGen/Code/SampleAsmdef.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 3d2cb53dacd664037aa35cdd7608a421 -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Sandbox/CodeGen/CodeGenExample.gen.cs b/Assets/Sandbox/CodeGen/CodeGenExample.gen.cs deleted file mode 100644 index 36fe2f7..0000000 --- a/Assets/Sandbox/CodeGen/CodeGenExample.gen.cs +++ /dev/null @@ -1,27 +0,0 @@ -// ----------------------- -// script auto-generated -// any changes to this file will be lost on next code generation -// com.quickeye.ui-toolkit-plus ver: 1.5.0 -// ----------------------- -using UnityEngine.UIElements; - -namespace SampleAsmDefName -{ - partial class CodeGenExample - { - private Label _title; - private VisualElement _menu; - private Button _confirmButton; - private QuickEye.UIToolkit.Tab _normalTab; - private QuickEye.UIToolkit.TabGroup _dropTab; - - protected void AssignQueryResults(VisualElement root) - { - _title = root.Q