New Version 1.42

Moving cam replay.
Fixed the bugs.

New Version 1.42

Moving cam replay.
Fixed the bugs.

New Version 1.42

Moving cam replay,
Fixed the bugs.
This commit is contained in:
SkunkStudios 2025-01-29 09:54:37 +07:00
parent dcb7df5fd1
commit 1c033119df
7079 changed files with 186851 additions and 48991 deletions

View file

@ -0,0 +1,8 @@
using System.Runtime.CompilerServices;
using UnityEditor.Experimental.UIElements;
[assembly: InternalsVisibleTo("Unity.PackageManagerCaptain.Editor")]
[assembly: InternalsVisibleTo("Unity.PackageManagerUI.EditorTests")]
#if UNITY_2018_3_OR_NEWER
[assembly: UxmlNamespacePrefix("UnityEditor.PackageManager.UI", "upm")]
#endif

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ca53a6f1e29564d528bb56b92e0f181c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: b0c12f0066bd444a1b3a900679169f30
folderAsset: yes
timeCreated: 1501783300
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: da0b41deddf0a4414b09681018c171f1
folderAsset: yes
timeCreated: 1502292048
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8c25f8b5c9da143328c516248414b95d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,105 @@
fileFormatVersion: 2
guid: 4dfd3f5da88944ec6ac5977d676c30c6
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
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
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
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
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
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:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -0,0 +1,97 @@
fileFormatVersion: 2
guid: acc34040a66fe4170bc8885268860cfe
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 6
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
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: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
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: 8
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
- serializedVersion: 2
buildTarget: Standalone
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:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

View file

@ -0,0 +1,105 @@
fileFormatVersion: 2
guid: 3cf132d4fa07f4f0cb2883499c5c7dd0
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
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
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
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
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
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: 66120540d98c346bab32966fe3676afd
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 907731821455c4fa989ac14278e02251
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,105 @@
fileFormatVersion: 2
guid: f8eca3a711f4842eba0c52ea9885ef7f
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
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
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
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
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
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:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -0,0 +1,97 @@
fileFormatVersion: 2
guid: 4c433abcdb28444ebb7bd395ba5c76fc
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 6
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
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: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
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: 8
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
- serializedVersion: 2
buildTarget: Standalone
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:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

View file

@ -0,0 +1,105 @@
fileFormatVersion: 2
guid: 01e02995805eb483690380a911a657e2
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
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
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
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
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
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: f6ebd98fa3a904bd4bb57dae59f0a4ce
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: fe684bbd80eab45778b9eb316893ff7c
folderAsset: yes
timeCreated: 1502132899
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,74 @@
/***************************************************************************************************
*** Auto-Generated - Do not modify .uss File ***
Only Modify Main.scss
***************************************************************************************************/
//--------------------------------------------------------------------------------------------------
// Pure theme colors
//--------------------------------------------------------------------------------------------------
$unity-text-color: #b4b4b4;
$unity-list-hover-background: #484848;
$unity-list-selected-background: #3e5f96;
$unity-background: #383838;
//--------------------------------------------------------------------------------------------------
// Custom colors
//--------------------------------------------------------------------------------------------------
$unity-background-light-contrast: #3c3c3c; // For dark contrast, use: #404040 and #232323
$unity-background-dark-contrast: #707070; // $
$unity-text-color-highlight: #f4f4f4;
$unity-installed-color-highlight: rgba(255,255,254,0.4);
$not-installed-package-background-color: #424242;
$package-tag-color: #ffa44e;
$package-tag-recommended-color: #e4e4e4;
$caret-text-color: #646464;
$link-text-color: #4F80F8;
//--------------------------------------------------------------------------------------------------
// Custom backgrounds
//--------------------------------------------------------------------------------------------------
$installed-package-background: resource("Builtin Skins/DarkSkin/Images/MenuItemOn.png");
$background-left-button: resource("Builtin Skins/DarkSkin/Images/btn left.png");
$background-left-button-selected: resource("Builtin Skins/DarkSkin/Images/btn left on.png");;
$background-mid-button: resource("Builtin Skins/DarkSkin/Images/btn mid.png");
$background-mid-button-selected: resource("Builtin Skins/DarkSkin/Images/btn mid on.png");
$background-right-button: resource("Builtin Skins/DarkSkin/Images/btn right.png");
$background-right-button-selected: resource("Builtin Skins/DarkSkin/Images/btn right on.png");
$background-button-slice-right: 0;
$background-button-slice-left: 0;
$background-button-slice-middle: 1;
$background-status-outdated: resource("Images/Dark/download");
$background-status-error: resource("Images/Dark/error");
$background-spinner-normal: resource("Images/Dark/loading");
$background-spinner-large: resource("Images/Dark/loading");
$popup-background: resource("Builtin Skins/DarkSkin/Images/mini popup.png");
$toolbar-background: resource("Builtin Skins/DarkSkin/Images/Toolbar.png");
$toolbar-button-background: resource("Builtin Skins/DarkSkin/Images/toolbar button.png");
$toolbar-button-active-background: resource("Builtin Skins/DarkSkin/Images/toolbar button act.png");
$toolbar-button-pulldown-background: resource("Builtin Skins/DarkSkin/Images/toolbar pulldown.png");
$toolbar-button-popup-background: resource("Builtin Skins/DarkSkin/Images/toolbar popup.png");
$toolbar-search-textfield-background: resource("Builtin Skins/DarkSkin/Images/toolbarsearch.png");
$toolbar-search-textfield-focus-background: resource("Builtin Skins/DarkSkin/Images/toolbarsearch focused.png");
$toolbar-search-cancel-background: resource("Builtin Skins/DarkSkin/Images/toolbarsearchCancelButton.png");
$toolbar-search-cancel-active-background: resource("Builtin Skins/DarkSkin/Images/toolbarsearchCancelButtonActive.png");
$toolbar-search-cancel-off-background: resource("Builtin Skins/DarkSkin/Images/toolbarsearchCancelButtonOff.png");
//--------------------------------------------------------------------------------------------------
// Common stylesheet
//--------------------------------------------------------------------------------------------------
@import "common";

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 880f2fc52037c4fe09edb80cfe84ac7c
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: c7559cdbc33f04af1a5a42d2aa5b40a5
ScriptedImporter:
fileIDToRecycleName:
11400000: stylesheet
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}

View file

@ -0,0 +1,74 @@
/***************************************************************************************************
*** Auto-Generated - Do not modify .uss File ***
Only Modify Main.scss
***************************************************************************************************/
//--------------------------------------------------------------------------------------------------
// Pure theme colors
//--------------------------------------------------------------------------------------------------
$unity-text-color: #000000;
$unity-list-hover-background: #8f8f8f;
$unity-list-selected-background: #3e7de7;
$unity-background: #c2c2c2;
//--------------------------------------------------------------------------------------------------
// Custom colors
//--------------------------------------------------------------------------------------------------
$unity-background-light-contrast: #D5D5D5;
$unity-background-dark-contrast: #6C6C6C;
$unity-text-color-highlight: #f4f4f4;
$unity-installed-color-highlight: rgba(1,0,0,0.3);
$not-installed-package-background-color: #d1d1d1;
$package-tag-color: #d25a00;
$package-tag-recommended-color: #000;
$caret-text-color: #646464;
$link-text-color: #0808FC;
//--------------------------------------------------------------------------------------------------
// Custom backgrounds
//--------------------------------------------------------------------------------------------------
$installed-package-background: resource("Builtin Skins/LightSkin/Images/MenuItemOn.png");
$background-left-button: resource("Builtin Skins/LightSkin/Images/btn left.png");
$background-left-button-selected: resource("Builtin Skins/LightSkin/Images/btn left on.png");;
$background-mid-button: resource("Builtin Skins/LightSkin/Images/btn mid.png");
$background-mid-button-selected: resource("Builtin Skins/LightSkin/Images/btn mid on.png");
$background-right-button: resource("Builtin Skins/LightSkin/Images/btn right.png");
$background-right-button-selected: resource("Builtin Skins/LightSkin/Images/btn right on.png");
$background-button-slice-right: 6;
$background-button-slice-left: 6;
$background-button-slice-middle: 1;
$background-status-outdated: resource("Images/Light/download");
$background-status-error: resource("Images/Dark/error");
$background-spinner-normal: resource("Images/Light/loading");
$background-spinner-large: resource("Images/Light/loading");
$popup-background: resource("Builtin Skins/LightSkin/Images/mini popup.png");
$toolbar-background: resource("Builtin Skins/LightSkin/Images/Toolbar.png");
$toolbar-button-background: resource("Builtin Skins/LightSkin/Images/toolbar button.png");
$toolbar-button-active-background: resource("Builtin Skins/LightSkin/Images/toolbar button act.png");
$toolbar-button-pulldown-background: resource("Builtin Skins/LightSkin/Images/toolbar pulldown.png");
$toolbar-button-popup-background: resource("Builtin Skins/LightSkin/Images/toolbar popup.png");
$toolbar-search-textfield-background: resource("Builtin Skins/LightSkin/Images/toolbarsearch.png");
$toolbar-search-textfield-focus-background: resource("Builtin Skins/LightSkin/Images/toolbarsearch focused.png");
$toolbar-search-cancel-background: resource("Builtin Skins/LightSkin/Images/toolbarsearchCancelButton.png");
$toolbar-search-cancel-active-background: resource("Builtin Skins/LightSkin/Images/toolbarsearchCancelButtonActive.png");
$toolbar-search-cancel-off-background: resource("Builtin Skins/LightSkin/Images/toolbarsearchCancelButtonOff.png");
//--------------------------------------------------------------------------------------------------
// Common stylesheet
//--------------------------------------------------------------------------------------------------
@import "common";

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: f1687bb24464840ae9e1d253685ae0f6
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: abdc053b8e3644f299aedc641d609a84
ScriptedImporter:
fileIDToRecycleName:
11400000: stylesheet
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}

View file

@ -0,0 +1,960 @@
// If you are using IntelliJ Rider, you can simply turn on the SCSS compiler, otherwise here is how to convert scss to uss
// # Install Sass
// gem install sass
//
// # Convert
// sass --sourcemap=none --style=expanded --scss --no-cache Main_Dark.scss Main_Dark.uss
// sass --sourcemap=none --style=expanded --scss --no-cache Main_Light.scss Main_Light.uss
//
// # Watch
// sass --watch --sourcemap=none --style=expanded --scss --no-cache Main_Light.scss:Main_Light.uss Main_Dark.scss:Main_Dark.uss
//
// Sass to Uss Notes
// - Sass converts rgb(0,0,0) to css 'black'. Uss doesn't support named colors. The workaround is to set the color in sass as #000000
//
// Uss Notes
// Runtime\UIElements\Managed\StyleSheets\StyleSheetCache.cs:50 to see which properties are available (until there is a doc)
//--------------------------------------------------------------------------------------------------
// Helper Mixins
//--------------------------------------------------------------------------------------------------
@mixin border($top, $right, $bottom, $left) {
@if $top != 'auto' {border-top-width: $top;}
@if $left != 'auto' {border-left-width: $right;}
@if $bottom != 'auto' {border-bottom-width: $bottom;}
@if $right != 'auto' {border-right-width: $left;}
}
@mixin border-box($width: 1) {
@include border($width, $width, $width, $width);
}
@mixin padding($top, $right, $bottom, $left) {
@if $top != 'auto' {padding-top: $top;}
@if $left != 'auto' {padding-left: $left;}
@if $bottom != 'auto' {padding-bottom: $bottom;}
@if $right != 'auto' {padding-right: $right;}
}
@mixin padding-box($size) {
@include padding($size, $size, $size, $size);
}
@mixin margin($top, $right, $bottom, $left) {
@if $top != 'auto' {margin-top: $top;}
@if $left != 'auto' {margin-left: $left;}
@if $bottom != 'auto' {margin-bottom: $bottom;}
@if $right != 'auto' {margin-right: $right;}
}
@mixin margin-box($size) {
@include margin($size, $size, $size, $size);
}
@mixin slice($top, $right, $bottom, $left) {
@if $top != 'auto' {-unity-slice-top: $top;}
@if $left != 'auto' {-unity-slice-left: $left;}
@if $bottom != 'auto' {-unity-slice-bottom: $bottom;}
@if $right != 'auto' {-unity-slice-right: $right;}
}
@mixin slice-box($size) {
@include slice($size, $size, $size, $size);
}
@mixin position($top, $right, $bottom, $left) {
@if $top != 'auto' {top: $top;}
@if $left != 'auto' {left: $left;}
@if $bottom != 'auto' {bottom: $bottom;}
@if $right != 'auto' {right: $right;}
}
@mixin text-clip() {
overflow: hidden;
}
@mixin selected-element() {
background-color: $unity-list-selected-background;
color: $unity-text-color-highlight;
}
@mixin active-tab() {
background-color: $unity-background-dark-contrast;
color: $unity-text-color-highlight;
}
@mixin inactive-tab() {
background-color: $unity-background-light-contrast;
color: $unity-text-color;
}
@mixin button($top, $right, $bottom, $left) {
flex: 0 0 auto;
@include padding($top, $right, $bottom, $left);
@include slice(4, 6, 4, 6);
&.display-none {
position: absolute;
border-radius: 0;
width: 0;
height: 0;
min-height: 0;
max-height: 0;
min-width: 0;
max-width: 0;
border-top-width: 0;
border-left-width: 0;
border-bottom-width: 0;
border-right-width: 0;
min-width: 0;
@include border-box(0);
@include padding-box(0);
@include margin-box(0);
@include slice-box(0);
visibility: hidden;
}
&:hover {
color: $unity-text-color;
}
}
@mixin button-box($size) {
@include button($size, $size, $size, $size);
}
//--------------------------------------------------------------------------------------------------
// Font
//--------------------------------------------------------------------------------------------------
@mixin font-small() {
font-size: 9;
}
@mixin font-normal() {
font-size: 12;
}
//--------------------------------------------------------------------------------------------------
// Styles
//--------------------------------------------------------------------------------------------------
#container {
-unity-position: absolute;
@include position(0, 0, 0, 0);
}
.display-none {
position: absolute;
overflow: hidden;
border-radius: 0;
width: 0;
height: 0;
min-height: 0;
max-height: 0;
min-width: 0;
max-width: 0;
border-top-width: 0;
border-left-width: 0;
border-bottom-width: 0;
border-right-width: 0;
@include border-box(0);
@include padding-box(0);
@include margin-box(0);
}
.row {
flex: 1 0 0;
flex-direction: row;
}
.column {
flex: 1 0 0;
flex-direction: column;
}
.tag {
@include border-box(1);
@include padding(1, 3, 1, 3);
@include font-small();
border-radius: 5;
-unity-text-align: middle-center;
border-color: #000000;
color: #000000;
}
$spinner-large-size: 32;
$spinner-large-half-size: 16;
$spinner-normal-size: 14;
$spinner-normal-half-size: 7;
$toolbar-height: 18;
#toolbarContainer {
flex: 0 0 auto;
flex-direction: row;
align-items: flex-start;
height: $toolbar-height;
#toolbarView {
flex: 1 0 0;
flex-direction: row;
align-items: flex-start;
background-image: $toolbar-background;
margin-top: -1;
@include slice(1, 1, 1, 1);
.toolbarButton {
flex: 1 0 0;
font-size: 9;
-unity-text-align: middle-center;
background-image: $toolbar-button-background;
@include button-box(0);
@include margin(0, -1, 0, 0);
@include padding(0, 5, 0, 5);
height: 19;
&.space {
margin-left: 7;
}
&.active {
background-image: $toolbar-button-active-background;
}
&.pulldown {
&:active {
background-image: $toolbar-button-background;
}
}
}
#toolbarLeft {
flex: 0 0 auto;
flex-direction: row;
align-items: flex-start;
}
#toolbarRight {
flex: 1 0 0;
flex-direction: row;
justify-content: flex-end;
#toolbarSearch {
flex: 1 0 0;
height: $toolbar-height;
max-width: 500;
flex-direction: row;
@include margin(0, 5, 0, 0);
}
}
}
}
#searchContainer {
flex: 1 0 0;
flex-direction: row;
align-items: center;
justify-content: flex-start;
height: 14;
@include margin(0, 0, 0, 0);
#searchTextField {
flex: 1 0 0;
font-size: 9;
background-image: $toolbar-search-textfield-background;
@include margin(2, 5, 1, 5);
@include padding(2, 17, 1, 17);
@include slice(1, 0, 1, 14);
height: 14;
&:focus {
background-image: $toolbar-search-textfield-focus-background;
}
&.placeholder {
color: $unity-background-dark-contrast;
}
}
#searchCancelButton {
width: 14;
height: 15;
background-image: $toolbar-search-cancel-off-background;
@include button-box(0);
@include slice(1, 14, 1, 0);
@include margin(3, 0, 2, -10);
@include padding-box(0);
@include border-box(0);
&.on {
background-image: $toolbar-search-cancel-background;
}
&:active {
background-image: $toolbar-search-cancel-active-background;
}
}
}
#detailListView {
flex: 1 0 0;
flex-direction: row;
.link {
color: $link-text-color;
background: rgba(0, 0, 0, 0);
background-image: none;
@include margin-box(0);
@include padding-box(0);
cursor: link;
}
.emptyArea {
flex: 1 0 0;
@extend .column;
.title {
-unity-text-align: middle-center;
font-size: 14;
}
.loading {
-unity-position: relative;
@include position($spinner-normal-half-size, auto, auto, $spinner-normal-half-size);
@include border-box(0);
@include padding-box(0);
@include margin-box(0);
@include slice-box(0);
width: $spinner-normal-size;
height: $spinner-normal-size;
max-width: $spinner-normal-size;
max-height: $spinner-normal-size;
}
}
#headerTitle {
flex: 1 0 0;
font-size: 12;
-unity-font-style: bold;
color: $unity-text-color;
}
#headerCaret {
flex: 0 0 auto;
font-size: 12;
-unity-font-style: bold;
color: $unity-text-color;
min-width: 16;
}
#spinnerContainer {
-unity-position: absolute;
@include position(3, 0, auto, 2);
width: 14;
flex: 0.1 0 0;
flex-direction: column;
align-items: center;
}
.loading {
-unity-position: relative;
@include position($spinner-normal-half-size, auto, auto, $spinner-normal-half-size);
@include border-box(0);
@include padding-box(0);
@include margin-box(0);
@include slice-box(0);
width: $spinner-normal-size;
height: $spinner-normal-size;
max-width: $spinner-normal-size;
max-height: $spinner-normal-size;
}
.combo {
@extend .row;
@include margin-box(3);
@include padding-box(3);
.popup {
@include padding(0, 0, 0, 8);
@include margin-box(0);
border-top-width-left-radius: 0;
border-bottom-width-left-radius: 0;
}
.button {
flex: 1 0 0; // Make buttons take all the parent's free space
@include font-normal();
@include border-box(0);
@include margin-box(0);
@include padding(2, 6, 3, 6);
@include slice(4, $background-button-slice-middle, 4, $background-button-slice-middle);
-unity-text-align: middle-center;
border-left-width: 0;
border-top-width: 0;
border-right-width: 0;
border-bottom-width: 0;
background-image: $background-mid-button;
border-top-width-right-radius: 0;
border-bottom-width-right-radius: 0;
border-top-width-left-radius: 0;
border-bottom-width-left-radius: 0;
&.selected {
background-image: $background-mid-button-selected;
color: $unity-text-color-highlight;
}
&.first {
@include slice(4, $background-button-slice-right, 4, 6);
background-image: $background-left-button;
&.selected {
background-image: $background-left-button-selected;
}
}
&.last {
@include slice(4, 6, 4, $background-button-slice-left);
background-image: $background-right-button;
&.selected {
background-image: $background-right-button-selected;
}
}
&.small {
flex: 0.5 0 0;
@include padding(0, 0, 0, 0);
}
}
}
//--------------------------------------------------------------------------------------------------
// Package List
//--------------------------------------------------------------------------------------------------
#packageListGroup {
width: 270;
#listContainerOuter {
@extend .column;
}
#groupContainerOuter {
#headerContainer {
flex: 1 0 0;
flex-direction: row;
align-items: center;
border-color: rgba(0,0,0, 0.5);
#headerTitle {
height: 0;
@include margin-box(0);
@include padding-box(0);
@include border-box(0);
}
}
#groupContainer {
@include margin(0, 0, 0, 0);
}
}
#packageList, #listContainer, #listGroups {
@extend .column;
}
#scrollView {
@extend .column;
#VerticalScroller {
bottom: 0;
}
#HorizontalScroller {
height: 0;
}
#ContentViewport {
bottom: 0;
#ContentView {
right: 0;
left: 0;
}
}
}
#noResult {
#noResultText {
-unity-word-wrap: true;
}
}
}
//--------------------------------------------------------------------------------------------------
// Package Item
//--------------------------------------------------------------------------------------------------
.package {
flex: 1 0 0;
flex-direction: row;
align-items: center;
@include margin(0, 0, 0, 0);
border-color: rgba(0,0,0, 0.5);
border-bottom-width: 1;
&.selected {
@include selected-element();
#packageName, #packageVersion {
color: $unity-text-color-highlight;
}
}
.status {
flex: 0 0 14;
width: 14;
height: 14;
@include margin(auto, 0, auto, 2);
&.installed {
background-image: $installed-package-background;
&.no-icon {
background-image: none;
}
}
&.outdated {
background-image: $background-status-outdated;
&.no-icon {
background-image: none;
}
}
&.inprogress {
background-image: none;
}
&.error {
background-image: $background-status-error;
}
}
.name {
flex: 1 0 0;
@include font-normal();
@include margin(auto, 5, auto, 0);
@include text-clip();
}
.version {
flex: 0 0 auto;
@include margin(auto, 5, auto, 0);
@include font-small;
}
}
//--------------------------------------------------------------------------------------------------
// Package Details
//--------------------------------------------------------------------------------------------------
#detailsGroup {
flex: 1 0 0;
border-left-width: 1px;
border-color: rgba(0,0,0, 0.5);
#detailsContainer {
flex: 1 0 0;
flex-direction: column;
-unity-position: relative;
}
}
#detailView {
flex: 1 0 0;
#VerticalScroller {
bottom: 0;
}
#ContentViewport {
#ContentView {
-unity-position: absolute;
@include position(0, 0, auto, 0);
}
}
.detail {
flex: 1 0 0;
flex-direction: column;
@include padding-box(5);
.header {
flex: 1 0 0;
flex-direction: row;
align-items: flex-start;
margin-bottom: 8;
#titleContainer {
flex: 0.9 0 0;
#detailTitle {
font-size: 18;
-unity-font-style: bold;
-unity-word-wrap: true;
@include margin(0, 0, 0, 4);
}
}
$controls-height: 19;
#detailsControls {
flex: 1 0 0;
height: $controls-height;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
@include margin(3, 0, 0, 0);
}
#updateCombo {
flex: 1 0 0;
height: $controls-height;
align-items: center;
@include margin(0, 0, 0, 0);
@include padding(0, 0, 0, 0);
#update {
flex: 0 0 auto;
}
#updateDropdownContainer {
min-width: 65;
max-width: 150;
height: $controls-height;
flex: 0 0 auto;
.popup {
@include font-normal();
height: $controls-height;
&:focus {
background-image: $popup-background;
}
&:hover {
.textElement {
color: $unity-text-color;
}
}
.textElement {
margin-top: 2;
}
}
}
.action {
flex: 0 0 auto;
@include margin-box(0);
@include font-normal();
@include padding(2, 4, 3, 4);
right: -3;
&:hover {
color: $unity-text-color;
}
}
}
#updateContainer {
height: $controls-height;
flex: 1 0 0;
align-items: flex-end;
@include padding-box(0);
}
.button {
height: $controls-height;
@include font-normal();
@include button(3,3,4,3);
}
}
#detailVersion {
font-size: 16;
max-height: 30;
}
#detailName {
flex: 1 0 0;
max-height: 20;
-unity-font-style: italic;
}
#detailPackageStatus {
flex: 1 0 0;
-unity-font-style: bold;
-unity-word-wrap: true;
}
#detailTag {
width: 60;
@include font-normal();
border-radius: 5;
border-color: rgb(180, 180, 180);
@include border-box(2);
-unity-text-align: middle-center;
}
#detailDesc, #detailModuleReference {
flex: 1 0 0;
@include font-normal();
-unity-word-wrap: true;
&.empty {
-unity-font-style: italic;
}
}
#detailAuthor {
flex: 1 0 0;
@include font-normal();
-unity-word-wrap: true;
}
#detailCategory {
flex: 1 0 0;
@include font-normal();
-unity-word-wrap: true;
@include margin(auto, auto, 5, auto);
}
#changeLogContainer, #viewLicensesContainer {
flex: 0 0 auto;
flex-direction: row;
}
#detailActions, .detailActions {
flex: 0 0 auto;
flex-direction: row;
margin-left: 2;
@extend .row;
.detailAction {
@include margin(auto, 0, auto, 0);
@include padding(auto, 2, auto, 2);
border-left-width: 2;
border-right-width: 2;
}
.detailActionSeparator {
@include margin(auto, 0, auto, 0);
@include padding(auto, 0, auto, 0);
border-left-width: 0;
border-right-width: 0;
}
#thirdPartyNoticeLabel {
@include margin(4, 0, 4, 0);
@include padding-box(0);
-unity-word-wrap: true;
}
#viewThirdParty {
border-right-width: 0;
}
}
.versionContainer {
@extend .row;
align-items: center;
justify-content: flex-start;
#detailVersion {
flex: 0 0 auto;
}
}
.tag {
border-color: $package-tag-color;
color: $package-tag-color;
&.verified {
border-color: $package-tag-recommended-color;
color: $package-tag-recommended-color;
}
}
.tagLines {
}
.tagLine {
flex: 0 0 auto;
flex-direction: row;
}
.tagContainer {
}
}
}
#detailError {
-unity-position: absolute;
@include position(5, 5, auto, 5);
min-height: 200;
-unity-word-wrap: true;
&.display-none {
@include position(0, 0, 0, 0);
width: 0;
height: 0;
min-height: 0;
max-height: 0;
@include border-box(0);
@include padding-box(0);
@include margin-box(0);
}
}
#packageStatusBar {
-unity-position: relative;
flex: 0 0 auto;
@include margin(2, 0, 0, 0);
border-color: rgba(0, 0, 0, 0.5);
@include border(1, 0, 0, 0);
}
#statusBarContainer {
flex-direction: row;
align-items: center;
justify-content: space-between;
#loadingContainer{
flex-direction: row;
align-items: center;
justify-content: flex-start;
margin-left: 2;
#loadingIcon {
background-image: $background-status-error;
width: 16;
height: 16;
margin-left: -12;
margin-right: 0;
}
#loadingText {
padding-left: 2;
-unity-font-style: italic;
&.icon {
margin-left: 0;
}
}
}
#moreAddOptionsButton {
font-size: 16;
background-image: none;
@include margin(0, 0, -2, 0);
@include padding(3, 6, 6, 6);
border-color: rgba(0, 0, 0, 0.5);
@include border(0, 1, 0, 0);
}
}
#packageAddFromUrlField {
-unity-position: absolute;
@include position(-35, 0, 0, 0);
}
#addFromUrlFieldContainer {
border-color: rgba(0, 0, 0, 0.5);
@include border(1, 0, 1, 0);
flex-direction: row;
justify-content: space-between;
align-items: center;
height: 35;
background-color: $unity-background;
#urlTextField {
flex: 1 0 0;
height: 20;
-unity-text-align: middle-left;
}
#addFromUrlButton {
flex: 0 0 auto;
height: 20;
}
}
}
.alert {
background-color: rgba(200,0,0,0.8);
border-color: #FF0000;
flex-direction: row;
@include border-box(1);
@include padding(5, 10, 5, 10);
#alertMessage {
flex: 1 0 0;
color: $unity-text-color-highlight;
-unity-word-wrap: true;
@include text-clip();
}
#close {
flex: 0 0 auto;
max-height: 30;
@include position(auto, auto, auto, 5);
@include button(3,3,4,3);
}
}
.spinner {
flex: 0 0 auto;
@include position(-$spinner-normal-half-size, auto, auto, -$spinner-normal-half-size);
min-width: $spinner-normal-size;
min-height: $spinner-normal-size;
max-width: $spinner-normal-size;
max-height: $spinner-normal-size;
background-image: $background-spinner-normal;
}
.largeSpinner {
flex: 0 0 auto;
@include position(-$spinner-large-half-size, auto, auto, -$spinner-large-half-size);
min-width: $spinner-large-size;
min-height: $spinner-large-size;
max-width: $spinner-large-size;
max-height: $spinner-large-size;
background-image: $background-spinner-large;
}

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: e45f79867376940b7ba31502238d8efa
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 1cf679539c5e5499e8856aaacf1fc32f
folderAsset: yes
timeCreated: 1502292048
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<engine:UXML
xmlns:engine="UnityEngine.Experimental.UIElements"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="UnityEngine.Experimental.UIElements UIElementsSchema/UnityEngine.Experimental.UIElements.xsd">
<engine:VisualElement name="alertContainer" class="alert">
<engine:Label name="alertMessage"/>
<engine:Button name="close" text="Close" class="button"/>
</engine:VisualElement>
</engine:UXML>

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4f768b64e6c37495699fffe3007e4379
ScriptedImporter:
fileIDToRecycleName:
11400000: tree
11400002: inlineStyle
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<engine:UXML
xmlns:engine="UnityEngine.Experimental.UIElements"
xmlns:upm="UnityEditor.PackageManager.UI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="UnityEngine.Experimental.UIElements UIElementsSchema/UnityEngine.Experimental.UIElements.xsd
UnityEditor.PackageManager.UI UIElementsSchema/UnityEditor.PackageManager.UI.xsd">
<engine:VisualElement name="addFromUrlFieldContainer" focus-index="0">
<engine:TextField name="urlTextField"/>
<engine:Button name="addFromUrlButton" text="Add"/>
</engine:VisualElement>
</engine:UXML>

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 97dff1b5ae41ee84886ae7a80ae21499
ScriptedImporter:
fileIDToRecycleName:
11400000: tree
11400002: inlineStyle
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}

View file

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<engine:UXML
xmlns:engine="UnityEngine.Experimental.UIElements"
xmlns:upm="UnityEditor.PackageManager.UI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="UnityEngine.Experimental.UIElements UIElementsSchema/UnityEngine.Experimental.UIElements.xsd
UnityEditor.PackageManager.UI UIElementsSchema/UnityEditor.PackageManager.UI.xsd">
<engine:VisualElement name="detailsContainer">
<engine:ScrollView name="detailView">
<engine:VisualElement name="detail" class="detail">
<engine:VisualElement class="header">
<engine:VisualElement name="titleContainer">
<engine:Label name="detailTitle"/>
</engine:VisualElement>
<engine:VisualElement name="detailsControls">
<engine:VisualElement name="updateContainer">
<engine:VisualElement name="updateCombo" class="combo">
<engine:Button name="update" text="Update" class="action"/>
<engine:VisualElement name="updateDropdownContainer" class="button last"/>
</engine:VisualElement>
</engine:VisualElement>
<engine:Button name="updateBuiltIn" text="Enable" class="button"/>
<engine:Button name="remove" text="Remove" class="button"/>
</engine:VisualElement>
</engine:VisualElement>
<engine:VisualElement class="versionContainer">
<engine:Label name="detailVersion"/>
<engine:VisualElement name="tag-inDevelopment" class="tagLine display-none">
<engine:Label name="tag" class="tag" text="in development"/>
</engine:VisualElement>
<engine:VisualElement name="tag-local" class="tagLine display-none">
<engine:Label name="tag" class="tag" text="local"/>
</engine:VisualElement>
<engine:VisualElement name="tag-preview" class="tagLine display-none">
<engine:Label name="tag" class="tag" text="preview"/>
</engine:VisualElement>
<engine:VisualElement name="tag-verified" class="tagLine display-none">
<engine:Label name="tagVerify" class="tag verified" text="verified"/>
</engine:VisualElement>
</engine:VisualElement>
<engine:VisualElement name="detailCustomContainer" class="display-none"/>
<engine:VisualElement name="documentationContainer" class="display-none">
<engine:VisualElement name="detailActions">
<engine:Button name="viewDocumentation" class="detailAction link" text="View documentation"/>
<engine:VisualElement name="changeLogContainer">
<engine:Label name="changelogSeparator" class="detailActionSeparator" text="-"/>
<engine:Button name="viewChangelog" class="detailAction link" text="View changelog"/>
</engine:VisualElement>
<engine:VisualElement name="viewLicensesContainer">
<engine:Label name="thirdPartySeparator" class="detailActionSeparator" text="-"/>
<engine:Button name="viewLicenses" class="link" text="View licenses"/>
</engine:VisualElement>
</engine:VisualElement>
</engine:VisualElement>
<engine:Label name="detailName"/>
<engine:Label name="detailAuthor"/>
<engine:Label name="detailModuleReference"/>
<engine:Label name="detailDesc"/>
</engine:VisualElement>
</engine:ScrollView>
<upm:Alert name="detailError" class="display-none"/>
</engine:VisualElement>
</engine:UXML>

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 93c1370867fcb45079592da39e0994c5
ScriptedImporter:
fileIDToRecycleName:
11400000: tree
11400002: inlineStyle
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<engine:UXML
xmlns:engine="UnityEngine.Experimental.UIElements"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="UnityEngine.Experimental.UIElements UIElementsSchema/UnityEngine.Experimental.UIElements.xsd">
<engine:VisualElement name="groupContainerOuter">
<engine:VisualElement name="headerContainer">
<engine:Label name="headerTitle" text="Default" />
</engine:VisualElement>
<engine:VisualElement name="groupContainer" />
</engine:VisualElement>
</engine:UXML>

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 25ebe415cc14c4f4ea15c34a796b75bb
ScriptedImporter:
fileIDToRecycleName:
11400000: tree
11400002: inlineStyle
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<engine:UXML
xmlns:engine="UnityEngine.Experimental.UIElements"
xmlns:upm="UnityEditor.PackageManager.UI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="UnityEngine.Experimental.UIElements UIElementsSchema/UnityEngine.Experimental.UIElements.xsd
UnityEditor.PackageManager.UI UIElementsSchema/UnityEditor.PackageManager.UI.xsd">
<engine:VisualElement name="packageContainer" class="package">
<engine:VisualElement name="spinnerContainer">
<engine:VisualElement name="loadingSpinnerContainer" class="loading">
<upm:LoadingSpinner name="packageSpinner" class="spinner"/>
</engine:VisualElement>
</engine:VisualElement>
<engine:Label name="packageState" class="status" />
<engine:Label name="packageName" class="name" />
<engine:Label name="packageVersion" class="version"/>
</engine:VisualElement>
</engine:UXML>

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 10145f279f90346bbb61712ff585828b
ScriptedImporter:
fileIDToRecycleName:
11400000: tree
11400002: inlineStyle
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<engine:UXML
xmlns:engine="UnityEngine.Experimental.UIElements"
xmlns:upm="UnityEditor.PackageManager.UI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="UnityEngine.Experimental.UIElements UIElementsSchema/UnityEngine.Experimental.UIElements.xsd
UnityEditor.PackageManager.UI UIElementsSchema/UnityEditor.PackageManager.UI.xsd">
<engine:VisualElement name="listContainerOuter">
<engine:VisualElement name="listContainer">
<!-- Specifying the vertical page size a workaround for https://fogbugz.unity3d.com/f/cases/1029430/ -->
<engine:ScrollView name="scrollView" vertical-page-size="10"/>
<engine:VisualElement name="emptyArea" class="list emptyArea">
<engine:Label class="title" text="There are no packages."/>
</engine:VisualElement>
<engine:VisualElement name="noResult" class="list emptyArea">
<engine:Label name="noResultText" class="title"/>
</engine:VisualElement>
</engine:VisualElement>
</engine:VisualElement>
</engine:UXML>

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 46c02d8d6499b4309ac1ec5d0b818585
ScriptedImporter:
fileIDToRecycleName:
11400000: tree
11400002: inlineStyle
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<engine:UXML
xmlns:engine="UnityEngine.Experimental.UIElements"
xmlns:upm="UnityEditor.PackageManager.UI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="UnityEngine.Experimental.UIElements UIElementsSchema/UnityEngine.Experimental.UIElements.xsd
UnityEditor.PackageManager.UI UIElementsSchema/UnityEditor.PackageManager.UI.xsd">
<engine:VisualElement name="toolbarView">
<engine:VisualElement name="toolbarLeft">
<engine:Label name="toolbarFilterButton" class="toolbarButton space pulldown" text="All Packages ▾"/>
<engine:Label class="toolbarButton"/>
</engine:VisualElement>
<engine:VisualElement name="toolbarRight">
<engine:Label name="toolbarAdvancedButton" class="toolbarButton pulldown" text="Advanced ▾"/>
<upm:PackageSearchToolbar name="toolbarSearch"/>
</engine:VisualElement>
</engine:VisualElement>
</engine:UXML>

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3aba9fe1ad29b42ffb0eea781318a626
ScriptedImporter:
fileIDToRecycleName:
11400000: tree
11400002: inlineStyle
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<engine:UXML
xmlns:engine="UnityEngine.Experimental.UIElements"
xmlns:upm="UnityEditor.PackageManager.UI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="UnityEngine.Experimental.UIElements UIElementsSchema/UnityEngine.Experimental.UIElements.xsd
UnityEditor.PackageManager.UI UIElementsSchema/UnityEditor.PackageManager.UI.xsd">
<engine:VisualElement name="container">
<upm:PackageManagerToolbar name="toolbarContainer"/>
<engine:VisualElement name="detailListView">
<engine:VisualElement name="packageListGroup">
<upm:PackageList name="packageList" />
<upm:PackageStatusBar name="packageStatusBar" />
</engine:VisualElement>
<upm:PackageDetails name="detailsGroup" />
</engine:VisualElement>
</engine:VisualElement>
</engine:UXML>

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a8d9e44eff3f447db9448925617ccb44
ScriptedImporter:
fileIDToRecycleName:
11400000: tree
11400002: inlineStyle
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<engine:UXML
xmlns:engine="UnityEngine.Experimental.UIElements"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="UnityEngine.Experimental.UIElements UIElementsSchema/UnityEngine.Experimental.UIElements.xsd">
<engine:VisualElement name="searchContainer">
<engine:TextField name="searchTextField"/>
<engine:Button name="searchCancelButton"/>
</engine:VisualElement>
</engine:UXML>

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: cd44c1bc0fa624a39aa784af44c62180
ScriptedImporter:
fileIDToRecycleName:
11400000: tree
11400002: inlineStyle
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<engine:UXML
xmlns:engine="UnityEngine.Experimental.UIElements"
xmlns:upm="UnityEditor.PackageManager.UI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="UnityEngine.Experimental.UIElements UIElementsSchema/UnityEngine.Experimental.UIElements.xsd
UnityEditor.PackageManager.UI UIElementsSchema/UnityEditor.PackageManager.UI.xsd">
<engine:VisualElement name="statusBarContainer">
<engine:VisualElement name="loadingContainer">
<engine:VisualElement name="loadingSpinnerContainer" class="loading">
<upm:LoadingSpinner name="packageSpinner" class="spinner"/>
</engine:VisualElement>
<engine:Label name="loadingIcon"/>
<engine:Label name="loadingText"/>
</engine:VisualElement>
<engine:Button name="moreAddOptionsButton" text="+"/>
</engine:VisualElement>
<upm:PackageAddFromUrlField name="packageAddFromUrlField"/>
</engine:UXML>

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: bbec1324b05a54939ad2fea2d7e11063
ScriptedImporter:
fileIDToRecycleName:
11400000: tree
11400002: inlineStyle
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3a2bf0128e2dd664f91dfba49e36a012
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:upm="UnityEditor.PackageManager.UI" xmlns:engine="UnityEngine.Experimental.UIElements" xmlns:editor="UnityEditor.Experimental.UIElements" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import schemaLocation="UnityEngine.Experimental.UIElements.xsd" namespace="UnityEngine.Experimental.UIElements" />
<xs:import schemaLocation="UnityEditor.PackageManager.UI.xsd" namespace="UnityEditor.PackageManager.UI" />
<xs:import schemaLocation="UnityEditor.Experimental.UIElements.xsd" namespace="UnityEditor.Experimental.UIElements" />
</xs:schema>

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 7d22934bf84ccd14082fd2d5a9f5951e
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,173 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:upm="UnityEditor.PackageManager.UI" xmlns:engine="UnityEngine.Experimental.UIElements" xmlns:editor="UnityEditor.Experimental.UIElements" elementFormDefault="qualified" targetNamespace="UnityEditor.Experimental.UIElements" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import schemaLocation="UnityEngine.Experimental.UIElements.xsd" namespace="UnityEngine.Experimental.UIElements" />
<xs:complexType name="DoubleFieldType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" />
<xs:attribute default="" name="text" type="xs:string" use="optional" />
<xs:attribute default="0" name="maxLength" type="xs:int" use="optional" />
<xs:attribute default="false" name="password" type="xs:boolean" use="optional" />
<xs:attribute default="" name="maskCharacter" type="xs:string" use="optional" />
<xs:attribute default="0" name="value" type="xs:float" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="DoubleField" substitutionGroup="engine:VisualElement" type="editor:DoubleFieldType" />
<xs:complexType name="IntegerFieldType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" />
<xs:attribute default="" name="text" type="xs:string" use="optional" />
<xs:attribute default="0" name="maxLength" type="xs:int" use="optional" />
<xs:attribute default="false" name="password" type="xs:boolean" use="optional" />
<xs:attribute default="" name="maskCharacter" type="xs:string" use="optional" />
<xs:attribute default="0" name="value" type="xs:int" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="IntegerField" substitutionGroup="engine:VisualElement" type="editor:IntegerFieldType" />
<xs:complexType name="CurveFieldType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="CurveField" substitutionGroup="engine:VisualElement" type="editor:CurveFieldType" />
<xs:complexType name="ObjectFieldType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" />
<xs:attribute default="true" name="allowSceneObjects" type="xs:boolean" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="ObjectField" substitutionGroup="engine:VisualElement" type="editor:ObjectFieldType" />
<xs:complexType name="ColorFieldType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" />
<xs:attribute default="RGBA(0.000, 0.000, 0.000, 1.000)" name="value" type="xs:string" use="optional" />
<xs:attribute default="true" name="showEyeDropper" type="xs:boolean" use="optional" />
<xs:attribute default="true" name="showAlpha" type="xs:boolean" use="optional" />
<xs:attribute default="false" name="hdr" type="xs:boolean" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="ColorField" substitutionGroup="engine:VisualElement" type="editor:ColorFieldType" />
<xs:complexType name="EnumFieldType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" />
<xs:attribute default="" name="text" type="xs:string" use="optional" />
<xs:attribute name="type" type="xs:string" use="required" />
<xs:attribute default="" name="value" type="xs:string" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="EnumField" substitutionGroup="engine:VisualElement" type="editor:EnumFieldType" />
<xs:complexType name="GradientFieldType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="GradientField" substitutionGroup="engine:VisualElement" type="editor:GradientFieldType" />
<xs:complexType name="RectFieldType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" />
<xs:attribute default="0" name="x" type="xs:float" use="optional" />
<xs:attribute default="0" name="y" type="xs:float" use="optional" />
<xs:attribute default="0" name="w" type="xs:float" use="optional" />
<xs:attribute default="0" name="h" type="xs:float" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="RectField" substitutionGroup="engine:VisualElement" type="editor:RectFieldType" />
<xs:complexType name="Vector2FieldType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" />
<xs:attribute default="0" name="x" type="xs:float" use="optional" />
<xs:attribute default="0" name="y" type="xs:float" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="Vector2Field" substitutionGroup="engine:VisualElement" type="editor:Vector2FieldType" />
<xs:complexType name="Vector3FieldType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" />
<xs:attribute default="0" name="x" type="xs:float" use="optional" />
<xs:attribute default="0" name="y" type="xs:float" use="optional" />
<xs:attribute default="0" name="z" type="xs:float" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="Vector3Field" substitutionGroup="engine:VisualElement" type="editor:Vector3FieldType" />
<xs:complexType name="Vector4FieldType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" />
<xs:attribute default="0" name="x" type="xs:float" use="optional" />
<xs:attribute default="0" name="y" type="xs:float" use="optional" />
<xs:attribute default="0" name="z" type="xs:float" use="optional" />
<xs:attribute default="0" name="w" type="xs:float" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="Vector4Field" substitutionGroup="engine:VisualElement" type="editor:Vector4FieldType" />
<xs:complexType name="BoundsFieldType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" />
<xs:attribute default="0" name="cx" type="xs:float" use="optional" />
<xs:attribute default="0" name="cy" type="xs:float" use="optional" />
<xs:attribute default="0" name="cz" type="xs:float" use="optional" />
<xs:attribute default="0" name="ex" type="xs:float" use="optional" />
<xs:attribute default="0" name="ey" type="xs:float" use="optional" />
<xs:attribute default="0" name="ez" type="xs:float" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="BoundsField" substitutionGroup="engine:VisualElement" type="editor:BoundsFieldType" />
</xs:schema>

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 86d0242b70e6ab24aaf5a0e67edf2a61
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,100 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:upm="UnityEditor.PackageManager.UI" xmlns:engine="UnityEngine.Experimental.UIElements" xmlns:editor="UnityEditor.Experimental.UIElements" elementFormDefault="qualified" targetNamespace="UnityEditor.PackageManager.UI" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import schemaLocation="UnityEngine.Experimental.UIElements.xsd" namespace="UnityEngine.Experimental.UIElements" />
<xs:complexType name="AlertType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="engine:VisualElement" />
</xs:sequence>
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" />
<xs:attribute default="" name="text" type="xs:string" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="Alert" substitutionGroup="engine:VisualElement" type="upm:AlertType" />
<xs:complexType name="LoadingSpinnerType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="LoadingSpinner" substitutionGroup="engine:VisualElement" type="upm:LoadingSpinnerType" />
<xs:complexType name="PackageDetailsType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="engine:VisualElement" />
</xs:sequence>
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="PackageDetails" substitutionGroup="engine:VisualElement" type="upm:PackageDetailsType" />
<xs:complexType name="PackageGroupType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="engine:VisualElement" />
</xs:sequence>
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="PackageGroup" substitutionGroup="engine:VisualElement" type="upm:PackageGroupType" />
<xs:complexType name="PackageItemType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="engine:VisualElement" />
</xs:sequence>
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="PackageItem" substitutionGroup="engine:VisualElement" type="upm:PackageItemType" />
<xs:complexType name="PackageListType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="engine:VisualElement" />
</xs:sequence>
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="PackageList" substitutionGroup="engine:VisualElement" type="upm:PackageListType" />
<xs:complexType name="PackageSearchFilterTabsType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="engine:VisualElement" />
</xs:sequence>
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="PackageSearchFilterTabs" substitutionGroup="engine:VisualElement" type="upm:PackageSearchFilterTabsType" />
</xs:schema>

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 3abc8faab9f5cbe4db0336c99fef85ca
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,269 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:upm="UnityEditor.PackageManager.UI" xmlns:engine="UnityEngine.Experimental.UIElements" xmlns:editor="UnityEditor.Experimental.UIElements" elementFormDefault="qualified" targetNamespace="UnityEngine.Experimental.UIElements" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="UXMLType">
<xs:complexContent mixed="false">
<xs:restriction base="xs:anyType">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="engine:VisualElement" />
</xs:sequence>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="UXML" type="engine:UXMLType" />
<xs:simpleType name="VisualElement_pickingMode_Type">
<xs:restriction base="xs:string">
<xs:enumeration value="Position" />
<xs:enumeration value="Ignore" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="VisualElementType">
<xs:complexContent mixed="false">
<xs:restriction base="xs:anyType">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="engine:VisualElement" />
</xs:sequence>
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="VisualElement" type="engine:VisualElementType" />
<xs:complexType name="IMGUIContainerType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="IMGUIContainer" substitutionGroup="engine:VisualElement" type="engine:IMGUIContainerType" />
<xs:complexType name="ImageType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="Image" substitutionGroup="engine:VisualElement" type="engine:ImageType" />
<xs:complexType name="LabelType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" />
<xs:attribute default="" name="text" type="xs:string" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="Label" substitutionGroup="engine:VisualElement" type="engine:LabelType" />
<xs:complexType name="RepeatButtonType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" />
<xs:attribute default="" name="text" type="xs:string" use="optional" />
<xs:attribute default="0" name="delay" type="xs:long" use="optional" />
<xs:attribute default="0" name="interval" type="xs:long" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="RepeatButton" substitutionGroup="engine:VisualElement" type="engine:RepeatButtonType" />
<xs:complexType name="ScrollerButtonType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" />
<xs:attribute default="0" name="delay" type="xs:long" use="optional" />
<xs:attribute default="0" name="interval" type="xs:long" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="ScrollerButton" substitutionGroup="engine:VisualElement" type="engine:ScrollerButtonType" />
<xs:complexType name="ScrollViewType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="engine:VisualElement" />
</xs:sequence>
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" />
<xs:attribute default="false" name="showHorizontalScroller" type="xs:boolean" use="optional" />
<xs:attribute default="false" name="showVerticalScroller" type="xs:boolean" use="optional" />
<xs:attribute default="0" name="horizontalLowValue" type="xs:float" use="optional" />
<xs:attribute default="0" name="horizontalHighValue" type="xs:float" use="optional" />
<xs:attribute default="0" name="horizontalPageSize" type="xs:float" use="optional" />
<xs:attribute default="0" name="horizontalValue" type="xs:float" use="optional" />
<xs:attribute default="0" name="verticalLowValue" type="xs:float" use="optional" />
<xs:attribute default="0" name="verticalHighValue" type="xs:float" use="optional" />
<xs:attribute default="0" name="verticalPageSize" type="xs:float" use="optional" />
<xs:attribute default="0" name="verticalValue" type="xs:float" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="ScrollView" substitutionGroup="engine:VisualElement" type="engine:ScrollViewType" />
<xs:simpleType name="Scroller_direction_Type">
<xs:restriction base="xs:string">
<xs:enumeration value="Horizontal" />
<xs:enumeration value="Vertical" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="ScrollerType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" />
<xs:attribute default="0" name="lowValue" type="xs:float" use="optional" />
<xs:attribute default="0" name="highValue" type="xs:float" use="optional" />
<xs:attribute default="Vertical" name="direction" type="engine:Scroller_direction_Type" use="optional" />
<xs:attribute default="0" name="value" type="xs:float" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="Scroller" substitutionGroup="engine:VisualElement" type="engine:ScrollerType" />
<xs:simpleType name="Slider_direction_Type">
<xs:restriction base="xs:string">
<xs:enumeration value="Horizontal" />
<xs:enumeration value="Vertical" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="SliderType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" />
<xs:attribute default="0" name="lowValue" type="xs:float" use="optional" />
<xs:attribute default="0" name="highValue" type="xs:float" use="optional" />
<xs:attribute default="0" name="pageSize" type="xs:float" use="optional" />
<xs:attribute default="Vertical" name="direction" type="engine:Slider_direction_Type" use="optional" />
<xs:attribute default="0" name="value" type="xs:float" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="Slider" substitutionGroup="engine:VisualElement" type="engine:SliderType" />
<xs:complexType name="TextFieldType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" />
<xs:attribute default="" name="text" type="xs:string" use="optional" />
<xs:attribute default="0" name="maxLength" type="xs:int" use="optional" />
<xs:attribute default="false" name="password" type="xs:boolean" use="optional" />
<xs:attribute default="" name="maskCharacter" type="xs:string" use="optional" />
<xs:attribute default="false" name="multiline" type="xs:boolean" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="TextField" substitutionGroup="engine:VisualElement" type="engine:TextFieldType" />
<xs:complexType name="ToggleType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" />
<xs:attribute default="" name="text" type="xs:string" use="optional" />
<xs:attribute default="false" name="value" type="xs:boolean" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="Toggle" substitutionGroup="engine:VisualElement" type="engine:ToggleType" />
<xs:complexType name="VisualContainerType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="engine:VisualElement" />
</xs:sequence>
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="VisualContainer" substitutionGroup="engine:VisualElement" type="engine:VisualContainerType" />
<xs:complexType name="TemplateContainerType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" />
<xs:attribute name="template" type="xs:string" use="required" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="TemplateContainer" substitutionGroup="engine:VisualElement" type="engine:TemplateContainerType" />
<xs:complexType name="BoxType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="engine:VisualElement" />
</xs:sequence>
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="Box" substitutionGroup="engine:VisualElement" type="engine:BoxType" />
<xs:complexType name="PopupWindowType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="engine:VisualElement" />
</xs:sequence>
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" />
<xs:attribute default="" name="text" type="xs:string" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="PopupWindow" substitutionGroup="engine:VisualElement" type="engine:PopupWindowType" />
<xs:complexType name="ListViewType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" />
<xs:attribute default="30" name="itemHeight" type="xs:int" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="ListView" substitutionGroup="engine:VisualElement" type="engine:ListViewType" />
<xs:complexType name="ButtonType">
<xs:complexContent mixed="false">
<xs:restriction base="engine:VisualElementType">
<xs:attribute default="" name="name" type="xs:string" use="optional" />
<xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" />
<xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" />
<xs:attribute default="" name="text" type="xs:string" use="optional" />
<xs:anyAttribute processContents="lax" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="Button" substitutionGroup="engine:VisualElement" type="engine:ButtonType" />
</xs:schema>

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 9da568db70dafa345a908282554b3672
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 3c61c79a991f84470843243e9710743e
folderAsset: yes
timeCreated: 1502224504
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 06b575597b644fe8ba88495149d01b66
timeCreated: 1503684160

View file

@ -0,0 +1,563 @@
/*
Copyright (c) 2013 Max Hauser
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
From: https://github.com/maxhauser/semver
*/
using System;
#if !NETSTANDARD
using System.Globalization;
using System.Runtime.Serialization;
using System.Security.Permissions;
#endif
using System.Text.RegularExpressions;
namespace Semver
{
/// <summary>
/// A semantic version implementation.
/// Conforms to v2.0.0 of http://semver.org/
/// </summary>
#if NETSTANDARD
public sealed class SemVersion : IComparable<SemVersion>, IComparable
#else
[Serializable]
internal sealed class SemVersion : IComparable<SemVersion>, IComparable, ISerializable
#endif
{
static Regex parseEx =
new Regex(@"^(?<major>\d+)" +
@"(\.(?<minor>\d+))?" +
@"(\.(?<patch>\d+))?" +
@"(\-(?<pre>[0-9A-Za-z\-\.]+))?" +
@"(\+(?<build>[0-9A-Za-z\-\.]+))?$",
#if NETSTANDARD
RegexOptions.CultureInvariant | RegexOptions.ExplicitCapture);
#else
RegexOptions.CultureInvariant | RegexOptions.Compiled | RegexOptions.ExplicitCapture);
#endif
#if !NETSTANDARD
/// <summary>
/// Initializes a new instance of the <see cref="SemVersion" /> class.
/// </summary>
/// <param name="info"></param>
/// <param name="context"></param>
/// <exception cref="ArgumentNullException"></exception>
private SemVersion(SerializationInfo info, StreamingContext context)
{
if (info == null) throw new ArgumentNullException("info");
var semVersion = Parse(info.GetString("SemVersion"));
Major = semVersion.Major;
Minor = semVersion.Minor;
Patch = semVersion.Patch;
Prerelease = semVersion.Prerelease;
Build = semVersion.Build;
}
#endif
/// <summary>
/// Initializes a new instance of the <see cref="SemVersion" /> class.
/// </summary>
/// <param name="major">The major version.</param>
/// <param name="minor">The minor version.</param>
/// <param name="patch">The patch version.</param>
/// <param name="prerelease">The prerelease version (eg. "alpha").</param>
/// <param name="build">The build eg ("nightly.232").</param>
public SemVersion(int major, int minor = 0, int patch = 0, string prerelease = "", string build = "")
{
this.Major = major;
this.Minor = minor;
this.Patch = patch;
this.Prerelease = prerelease ?? "";
this.Build = build ?? "";
}
/// <summary>
/// Initializes a new instance of the <see cref="SemVersion"/> class.
/// </summary>
/// <param name="version">The <see cref="System.Version"/> that is used to initialize
/// the Major, Minor, Patch and Build properties.</param>
public SemVersion(Version version)
{
if (version == null)
throw new ArgumentNullException("version");
this.Major = version.Major;
this.Minor = version.Minor;
if (version.Revision >= 0)
{
this.Patch = version.Revision;
}
this.Prerelease = String.Empty;
if (version.Build > 0)
{
this.Build = version.Build.ToString();
}
else
{
this.Build = String.Empty;
}
}
/// <summary>
/// Parses the specified string to a semantic version.
/// </summary>
/// <param name="version">The version string.</param>
/// <param name="strict">If set to <c>true</c> minor and patch version are required, else they default to 0.</param>
/// <returns>The SemVersion object.</returns>
/// <exception cref="System.InvalidOperationException">When a invalid version string is passed.</exception>
public static SemVersion Parse(string version, bool strict = false)
{
var match = parseEx.Match(version);
if (!match.Success)
{
return new SemVersion(0);
}
#if NETSTANDARD
var major = int.Parse(match.Groups["major"].Value);
#else
var major = int.Parse(match.Groups["major"].Value, CultureInfo.InvariantCulture);
#endif
var minorMatch = match.Groups["minor"];
int minor = 0;
if (minorMatch.Success)
{
#if NETSTANDARD
minor = int.Parse(minorMatch.Value);
#else
minor = int.Parse(minorMatch.Value, CultureInfo.InvariantCulture);
#endif
}
else if (strict)
{
throw new InvalidOperationException("Invalid version (no minor version given in strict mode)");
}
var patchMatch = match.Groups["patch"];
int patch = 0;
if (patchMatch.Success)
{
#if NETSTANDARD
patch = int.Parse(patchMatch.Value);
#else
patch = int.Parse(patchMatch.Value, CultureInfo.InvariantCulture);
#endif
}
else if (strict)
{
throw new InvalidOperationException("Invalid version (no patch version given in strict mode)");
}
var prerelease = match.Groups["pre"].Value;
var build = match.Groups["build"].Value;
return new SemVersion(major, minor, patch, prerelease, build);
}
/// <summary>
/// Parses the specified string to a semantic version.
/// </summary>
/// <param name="version">The version string.</param>
/// <param name="semver">When the method returns, contains a SemVersion instance equivalent
/// to the version string passed in, if the version string was valid, or <c>null</c> if the
/// version string was not valid.</param>
/// <param name="strict">If set to <c>true</c> minor and patch version are required, else they default to 0.</param>
/// <returns><c>False</c> when a invalid version string is passed, otherwise <c>true</c>.</returns>
public static bool TryParse(string version, out SemVersion semver, bool strict = false)
{
try
{
semver = Parse(version, strict);
return true;
}
catch (Exception)
{
semver = null;
return false;
}
}
/// <summary>
/// Tests the specified versions for equality.
/// </summary>
/// <param name="versionA">The first version.</param>
/// <param name="versionB">The second version.</param>
/// <returns>If versionA is equal to versionB <c>true</c>, else <c>false</c>.</returns>
public static bool Equals(SemVersion versionA, SemVersion versionB)
{
if (ReferenceEquals(versionA, null))
return ReferenceEquals(versionB, null);
return versionA.Equals(versionB);
}
/// <summary>
/// Compares the specified versions.
/// </summary>
/// <param name="versionA">The version to compare to.</param>
/// <param name="versionB">The version to compare against.</param>
/// <returns>If versionA &lt; versionB <c>&lt; 0</c>, if versionA &gt; versionB <c>&gt; 0</c>,
/// if versionA is equal to versionB <c>0</c>.</returns>
public static int Compare(SemVersion versionA, SemVersion versionB)
{
if (ReferenceEquals(versionA, null))
return ReferenceEquals(versionB, null) ? 0 : -1;
return versionA.CompareTo(versionB);
}
/// <summary>
/// Make a copy of the current instance with optional altered fields.
/// </summary>
/// <param name="major">The major version.</param>
/// <param name="minor">The minor version.</param>
/// <param name="patch">The patch version.</param>
/// <param name="prerelease">The prerelease text.</param>
/// <param name="build">The build text.</param>
/// <returns>The new version object.</returns>
public SemVersion Change(int? major = null, int? minor = null, int? patch = null,
string prerelease = null, string build = null)
{
return new SemVersion(
major ?? this.Major,
minor ?? this.Minor,
patch ?? this.Patch,
prerelease ?? this.Prerelease,
build ?? this.Build);
}
/// <summary>
/// Gets the major version.
/// </summary>
/// <value>
/// The major version.
/// </value>
public int Major { get; private set; }
/// <summary>
/// Gets the minor version.
/// </summary>
/// <value>
/// The minor version.
/// </value>
public int Minor { get; private set; }
/// <summary>
/// Gets the patch version.
/// </summary>
/// <value>
/// The patch version.
/// </value>
public int Patch { get; private set; }
/// <summary>
/// Gets the pre-release version.
/// </summary>
/// <value>
/// The pre-release version.
/// </value>
public string Prerelease { get; private set; }
/// <summary>
/// Gets the build version.
/// </summary>
/// <value>
/// The build version.
/// </value>
public string Build { get; private set; }
/// <summary>
/// Returns a <see cref="System.String" /> that represents this instance.
/// </summary>
/// <returns>
/// A <see cref="System.String" /> that represents this instance.
/// </returns>
public override string ToString()
{
var version = "" + Major + "." + Minor + "." + Patch;
if (!String.IsNullOrEmpty(Prerelease))
version += "-" + Prerelease;
if (!String.IsNullOrEmpty(Build))
version += "+" + Build;
return version;
}
/// <summary>
/// Compares the current instance with another object of the same type and returns an integer that indicates
/// whether the current instance precedes, follows, or occurs in the same position in the sort order as the
/// other object.
/// </summary>
/// <param name="obj">An object to compare with this instance.</param>
/// <returns>
/// A value that indicates the relative order of the objects being compared.
/// The return value has these meanings: Value Meaning Less than zero
/// This instance precedes <paramref name="obj" /> in the sort order.
/// Zero This instance occurs in the same position in the sort order as <paramref name="obj" />. i
/// Greater than zero This instance follows <paramref name="obj" /> in the sort order.
/// </returns>
public int CompareTo(object obj)
{
return CompareTo((SemVersion)obj);
}
/// <summary>
/// Compares the current instance with another object of the same type and returns an integer that indicates
/// whether the current instance precedes, follows, or occurs in the same position in the sort order as the
/// other object.
/// </summary>
/// <param name="other">An object to compare with this instance.</param>
/// <returns>
/// A value that indicates the relative order of the objects being compared.
/// The return value has these meanings: Value Meaning Less than zero
/// This instance precedes <paramref name="other" /> in the sort order.
/// Zero This instance occurs in the same position in the sort order as <paramref name="other" />. i
/// Greater than zero This instance follows <paramref name="other" /> in the sort order.
/// </returns>
public int CompareTo(SemVersion other)
{
if (ReferenceEquals(other, null))
return 1;
var r = this.CompareByPrecedence(other);
if (r != 0)
return r;
r = CompareComponent(this.Build, other.Build);
return r;
}
/// <summary>
/// Compares to semantic versions by precedence. This does the same as a Equals, but ignores the build information.
/// </summary>
/// <param name="other">The semantic version.</param>
/// <returns><c>true</c> if the version precedence matches.</returns>
public bool PrecedenceMatches(SemVersion other)
{
return CompareByPrecedence(other) == 0;
}
/// <summary>
/// Compares to semantic versions by precedence. This does the same as a Equals, but ignores the build information.
/// </summary>
/// <param name="other">The semantic version.</param>
/// <returns>
/// A value that indicates the relative order of the objects being compared.
/// The return value has these meanings: Value Meaning Less than zero
/// This instance precedes <paramref name="other" /> in the version precedence.
/// Zero This instance has the same precedence as <paramref name="other" />. i
/// Greater than zero This instance has creater precedence as <paramref name="other" />.
/// </returns>
public int CompareByPrecedence(SemVersion other)
{
if (ReferenceEquals(other, null))
return 1;
var r = this.Major.CompareTo(other.Major);
if (r != 0) return r;
r = this.Minor.CompareTo(other.Minor);
if (r != 0) return r;
r = this.Patch.CompareTo(other.Patch);
if (r != 0) return r;
r = CompareComponent(this.Prerelease, other.Prerelease, true);
return r;
}
static int CompareComponent(string a, string b, bool lower = false)
{
var aEmpty = String.IsNullOrEmpty(a);
var bEmpty = String.IsNullOrEmpty(b);
if (aEmpty && bEmpty)
return 0;
if (aEmpty)
return lower ? 1 : -1;
if (bEmpty)
return lower ? -1 : 1;
var aComps = a.Split('.');
var bComps = b.Split('.');
var minLen = Math.Min(aComps.Length, bComps.Length);
for (int i = 0; i < minLen; i++)
{
var ac = aComps[i];
var bc = bComps[i];
int anum, bnum;
var isanum = Int32.TryParse(ac, out anum);
var isbnum = Int32.TryParse(bc, out bnum);
int r;
if (isanum && isbnum)
{
r = anum.CompareTo(bnum);
if (r != 0) return anum.CompareTo(bnum);
}
else
{
if (isanum)
return -1;
if (isbnum)
return 1;
r = String.CompareOrdinal(ac, bc);
if (r != 0)
return r;
}
}
return aComps.Length.CompareTo(bComps.Length);
}
/// <summary>
/// Determines whether the specified <see cref="System.Object" /> is equal to this instance.
/// </summary>
/// <param name="obj">The <see cref="System.Object" /> to compare with this instance.</param>
/// <returns>
/// <c>true</c> if the specified <see cref="System.Object" /> is equal to this instance; otherwise, <c>false</c>.
/// </returns>
public override bool Equals(object obj)
{
if (ReferenceEquals(obj, null))
return false;
if (ReferenceEquals(this, obj))
return true;
var other = (SemVersion)obj;
return this.Major == other.Major &&
this.Minor == other.Minor &&
this.Patch == other.Patch &&
string.Equals(this.Prerelease, other.Prerelease, StringComparison.Ordinal) &&
string.Equals(this.Build, other.Build, StringComparison.Ordinal);
}
/// <summary>
/// Returns a hash code for this instance.
/// </summary>
/// <returns>
/// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
/// </returns>
public override int GetHashCode()
{
unchecked
{
int result = this.Major.GetHashCode();
result = result * 31 + this.Minor.GetHashCode();
result = result * 31 + this.Patch.GetHashCode();
result = result * 31 + this.Prerelease.GetHashCode();
result = result * 31 + this.Build.GetHashCode();
return result;
}
}
#if !NETSTANDARD
[SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
public void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (info == null) throw new ArgumentNullException("info");
info.AddValue("SemVersion", ToString());
}
#endif
/// <summary>
/// Implicit conversion from string to SemVersion.
/// </summary>
/// <param name="version">The semantic version.</param>
/// <returns>The SemVersion object.</returns>
public static implicit operator SemVersion(string version)
{
return SemVersion.Parse(version);
}
/// <summary>
/// The override of the equals operator.
/// </summary>
/// <param name="left">The left value.</param>
/// <param name="right">The right value.</param>
/// <returns>If left is equal to right <c>true</c>, else <c>false</c>.</returns>
public static bool operator ==(SemVersion left, SemVersion right)
{
return SemVersion.Equals(left, right);
}
/// <summary>
/// The override of the un-equal operator.
/// </summary>
/// <param name="left">The left value.</param>
/// <param name="right">The right value.</param>
/// <returns>If left is not equal to right <c>true</c>, else <c>false</c>.</returns>
public static bool operator !=(SemVersion left, SemVersion right)
{
return !SemVersion.Equals(left, right);
}
/// <summary>
/// The override of the greater operator.
/// </summary>
/// <param name="left">The left value.</param>
/// <param name="right">The right value.</param>
/// <returns>If left is greater than right <c>true</c>, else <c>false</c>.</returns>
public static bool operator >(SemVersion left, SemVersion right)
{
return SemVersion.Compare(left, right) > 0;
}
/// <summary>
/// The override of the greater than or equal operator.
/// </summary>
/// <param name="left">The left value.</param>
/// <param name="right">The right value.</param>
/// <returns>If left is greater than or equal to right <c>true</c>, else <c>false</c>.</returns>
public static bool operator >=(SemVersion left, SemVersion right)
{
return left == right || left > right;
}
/// <summary>
/// The override of the less operator.
/// </summary>
/// <param name="left">The left value.</param>
/// <param name="right">The right value.</param>
/// <returns>If left is less than right <c>true</c>, else <c>false</c>.</returns>
public static bool operator <(SemVersion left, SemVersion right)
{
return SemVersion.Compare(left, right) < 0;
}
/// <summary>
/// The override of the less than or equal operator.
/// </summary>
/// <param name="left">The left value.</param>
/// <param name="right">The right value.</param>
/// <returns>If left is less than or equal to right <c>true</c>, else <c>false</c>.</returns>
public static bool operator <=(SemVersion left, SemVersion right)
{
return left == right || left < right;
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 5075cb5aa3254b099b11b2840d7cd46e
timeCreated: 1503684176

View file

@ -0,0 +1,15 @@
namespace Semver
{
internal static class SemVersionExtension
{
public static string VersionOnly(this SemVersion version)
{
return "" + version.Major + "." + version.Minor + "." + version.Patch;
}
public static string ShortVersion(this SemVersion version)
{
return version.Major + "." + version.Minor;
}
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9f17a0688211d476f8d8c9742bb9f992
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: afd7697844f4142f9aa91471c1fba506
folderAsset: yes
timeCreated: 1502224642
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 1067213df0c64b319bc81e73be809b1a
timeCreated: 1505249387

View file

@ -0,0 +1,17 @@
using System.Linq;
using UnityEngine;
namespace UnityEditor.PackageManager.UI
{
class ApplicationUtil
{
public static bool IsPreReleaseVersion
{
get
{
var lastToken = Application.unityVersion.Split('.').LastOrDefault();
return lastToken.Contains("a") || lastToken.Contains("b");
}
}
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7ed48dcc992234c659018e00590315b7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,30 @@
using System;
namespace UnityEditor.PackageManager.UI
{
[Serializable]
internal class OperationSignal<T> where T: IBaseOperation
{
public event Action<T> OnOperation = delegate { };
public T Operation { get; set; }
public void SetOperation(T operation)
{
Operation = operation;
OnOperation(operation);
}
public void WhenOperation(Action<T> callback)
{
if (Operation != null)
callback(Operation);
OnOperation += callback;
}
internal void ResetEvents()
{
OnOperation = delegate { };
}
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7da0c11c52b4044de81c175887699282
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,19 @@
using UnityEngine.Experimental.UIElements;
namespace UnityEditor.PackageManager.UI
{
internal static class Resources
{
private static string TemplateRoot { get { return PackageManagerWindow.ResourcesPath + "Templates"; } }
private static string TemplatePath(string filename)
{
return string.Format("{0}/{1}", TemplateRoot, filename);
}
public static VisualElement GetTemplate(string templateFilename)
{
return AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(TemplatePath(templateFilename)).CloneTree(null);
}
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d6a708dbb74414a6dbd60e07d9513c1c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,35 @@
using System.Threading;
namespace UnityEditor.PackageManager.UI
{
internal class ThreadedDelay
{
public int Length { get; set; } // In milliseconds
public bool IsDone { get; private set; }
public ThreadedDelay(int length = 0)
{
Length = length;
IsDone = false;
}
public void Start()
{
if (Length <= 0)
{
IsDone = true;
return;
}
IsDone = false;
Thread newThread = new Thread(() =>
{
Thread.Sleep(Length);
IsDone = true;
});
newThread.Start();
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 490fe93dbc954e3ba3651b7f55eaba70
timeCreated: 1505249395

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3385f7527e5be4c65b3a5294e8995ff8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,13 @@
using System;
namespace UnityEditor.PackageManager.UI
{
internal interface IAddOperation : IBaseOperation
{
event Action<PackageInfo> OnOperationSuccess;
PackageInfo PackageInfo { get; }
void AddPackageAsync(PackageInfo packageInfo, Action<PackageInfo> doneCallbackAction = null, Action<Error> errorCallbackAction = null);
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 3dcbbc060dea46168ffc09a580836240
timeCreated: 1504191596

View file

@ -0,0 +1,14 @@
using System;
namespace UnityEditor.PackageManager.UI
{
internal interface IBaseOperation
{
event Action<Error> OnOperationError;
event Action OnOperationFinalized;
bool IsCompleted { get; }
void Cancel();
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 2f1849b9179b464381598f68663790d3
timeCreated: 1507041169

View file

@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
namespace UnityEditor.PackageManager.UI
{
internal interface IListOperation : IBaseOperation
{
bool OfflineMode { get; set; }
void GetPackageListAsync(Action<IEnumerable<PackageInfo>> doneCallbackAction, Action<Error> errorCallbackAction = null);
}
}

View file

@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: b7e8a8fb69eacee439474914ea54bf9b
timeCreated: 1502913188
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,14 @@
namespace UnityEditor.PackageManager.UI
{
/// <summary>
/// This is the Interface we will use to create the facade we need for testing.
/// In the case of the Fake factory, we can create fake operations with doctored data we use for our tests.
/// </summary>
internal interface IOperationFactory
{
IListOperation CreateListOperation(bool offlineMode = false);
ISearchOperation CreateSearchOperation();
IAddOperation CreateAddOperation();
IRemoveOperation CreateRemoveOperation();
}
}

View file

@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: 0a1161a2ab6569948a0aa7899197218c
timeCreated: 1502915478
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,11 @@
using System;
namespace UnityEditor.PackageManager.UI
{
internal interface IRemoveOperation : IBaseOperation
{
event Action<PackageInfo> OnOperationSuccess;
void RemovePackageAsync(PackageInfo package, Action<PackageInfo> doneCallbackAction = null, Action<Error> errorCallbackAction = null);
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 54e5fc61925bc4ca3b2c1e82dfb35eb5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,10 @@
using System;
using System.Collections.Generic;
namespace UnityEditor.PackageManager.UI
{
internal interface ISearchOperation : IBaseOperation
{
void GetAllPackageAsync(Action<IEnumerable<PackageInfo>> doneCallbackAction = null, Action<Error> errorCallbackAction = null);
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 85dba6b2d7204a7f9a1f976eb0a6b4d2
timeCreated: 1508160206

View file

@ -0,0 +1,24 @@
namespace UnityEditor.PackageManager.UI
{
internal static class OperationFactory
{
private static IOperationFactory _instance;
public static IOperationFactory Instance
{
get {
if (_instance == null)
_instance = new UpmOperationFactory ();
return _instance;
}
internal set {
_instance = value;
}
}
internal static void Reset()
{
_instance = null;
}
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9ec5dc72125424af38a9bfaca532acc8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: e53bc96d2d054b8cbc811f0d73e761eb
timeCreated: 1504191702

View file

@ -0,0 +1,222 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEngine;
namespace UnityEditor.PackageManager.UI
{
// History of a single package
internal class Package : IEquatable<Package>
{
static public bool ShouldProposeLatestVersions
{
get
{
// Until we figure out a way to test this properly, alway show standard behavior
// return InternalEditorUtility.IsUnityBeta() && !Unsupported.IsDeveloperMode();
return false;
}
}
// There can only be one package add/remove operation.
private static IBaseOperation addRemoveOperationInstance;
public static bool AddRemoveOperationInProgress
{
get { return addRemoveOperationInstance != null && !addRemoveOperationInstance.IsCompleted; }
}
internal const string packageManagerUIName = "com.unity.package-manager-ui";
private readonly string packageName;
private IEnumerable<PackageInfo> source;
internal Package(string packageName, IEnumerable<PackageInfo> infos)
{
if (string.IsNullOrEmpty(packageName))
throw new ArgumentException("Cannot be empty or null", "packageName");
if (!infos.Any())
throw new ArgumentException("Cannot be empty", "infos");
this.packageName = packageName;
UpdateSource(infos);
}
internal void UpdateSource(IEnumerable<PackageInfo> source)
{
this.source = source;
#if UNITY_2018_3_OR_NEWER
if (IsPackageManagerUI)
this.source = this.source.Where(p => p != null && p.Version.Major >= 2);
#endif
}
public PackageInfo Current { get { return Versions.FirstOrDefault(package => package.IsCurrent); } }
// This is the latest verified or official release (eg: 1.3.2). Not necessarily the latest verified release (eg: 1.2.4) or that latest candidate (eg: 1.4.0-beta)
public PackageInfo LatestUpdate
{
get
{
// We want to show the absolute latest when in beta mode
if (ShouldProposeLatestVersions)
return Latest;
// Override with current when it's version locked
var current = Current;
if (current != null && current.IsVersionLocked)
return current;
// Get all the candidates versions (verified, release, preview) that are newer than current
var verified = Verified;
var latestRelease = LatestRelease;
var latestPreview = Versions.LastOrDefault(package => package.IsPreview);
var candidates = new List<PackageInfo>
{
verified,
latestRelease,
latestPreview,
}.Where(package => package != null && (current == null || current == package || current.Version < package.Version)).ToList();
if (candidates.Contains(verified))
return verified;
if ((current == null || !current.IsVerified ) && candidates.Contains(latestRelease))
return latestRelease;
if ((current == null || current.IsPreview) && candidates.Contains(latestPreview))
return latestPreview;
// Show current if it exists, otherwise latest user visible, and then otherwise show the absolute latest
return current ?? Latest;
}
}
public PackageInfo LatestPatch
{
get
{
if (Current == null)
return null;
// Get all version that have the same Major/Minor
var versions = Versions.Where(package => package.Version.Major == Current.Version.Major && package.Version.Minor == Current.Version.Minor);
return versions.LastOrDefault();
}
}
// This is the very latest version, including pre-releases (eg: 1.4.0-beta).
internal PackageInfo Latest { get { return Versions.FirstOrDefault(package => package.IsLatest) ?? Versions.LastOrDefault(); } }
// Returns the current version if it exist, otherwise returns the latest user visible version.
internal PackageInfo VersionToDisplay { get { return Current ?? LatestUpdate; } }
// Every version available for this package
internal IEnumerable<PackageInfo> Versions { get { return source.OrderBy(package => package.Version); } }
// Every version that's not a pre-release (eg: not beta/alpha/preview).
internal IEnumerable<PackageInfo> ReleaseVersions
{
get { return Versions.Where(package => !package.IsPreRelease); }
}
internal PackageInfo LatestRelease { get {return ReleaseVersions.LastOrDefault();}}
internal PackageInfo Verified { get {return Versions.FirstOrDefault(package => package.IsVerified);}}
internal bool IsAfterCurrentVersion(PackageInfo packageInfo) { return Current == null || (packageInfo != null && packageInfo.Version > Current.Version); }
internal bool IsBuiltIn {get { return Versions.Any() && Versions.First().IsBuiltIn; }}
public string Name { get { return packageName; } }
public bool IsPackageManagerUI
{
get { return Name == packageManagerUIName; }
}
public bool Equals(Package other)
{
if (other == null)
return false;
return packageName == other.packageName;
}
public override int GetHashCode()
{
return packageName.GetHashCode();
}
[SerializeField]
internal readonly OperationSignal<IAddOperation> AddSignal = new OperationSignal<IAddOperation>();
private Action OnAddOperationFinalizedEvent;
internal void Add(PackageInfo packageInfo)
{
if (packageInfo == Current || AddRemoveOperationInProgress)
return;
var operation = OperationFactory.Instance.CreateAddOperation();
addRemoveOperationInstance = operation;
OnAddOperationFinalizedEvent = () =>
{
AddSignal.Operation = null;
operation.OnOperationFinalized -= OnAddOperationFinalizedEvent;
PackageCollection.Instance.FetchListOfflineCache(true);
};
operation.OnOperationFinalized += OnAddOperationFinalizedEvent;
AddSignal.SetOperation(operation);
operation.AddPackageAsync(packageInfo);
}
internal void Update()
{
Add(Latest);
}
internal static void AddFromLocalDisk(string path)
{
if (AddRemoveOperationInProgress)
return;
var packageJson = PackageJsonHelper.Load(path);
if (null == packageJson)
{
Debug.LogError(string.Format("Invalid package path: cannot find \"{0}\".", path));
return;
}
var operation = OperationFactory.Instance.CreateAddOperation();
addRemoveOperationInstance = operation;
operation.AddPackageAsync(packageJson.PackageInfo);
}
[SerializeField]
internal readonly OperationSignal<IRemoveOperation> RemoveSignal = new OperationSignal<IRemoveOperation>();
private Action OnRemoveOperationFinalizedEvent;
public void Remove()
{
if (Current == null || AddRemoveOperationInProgress)
return;
var operation = OperationFactory.Instance.CreateRemoveOperation();
addRemoveOperationInstance = operation;
OnRemoveOperationFinalizedEvent = () =>
{
RemoveSignal.Operation = null;
operation.OnOperationFinalized -= OnRemoveOperationFinalizedEvent;
PackageCollection.Instance.FetchListOfflineCache(true);
};
operation.OnOperationFinalized += OnRemoveOperationFinalizedEvent;
RemoveSignal.SetOperation(operation);
operation.RemovePackageAsync(Current);
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: f499e12eaeb145bf9022f581c0b7fa5b
timeCreated: 1505740170

View file

@ -0,0 +1,21 @@
using System.Linq;
namespace UnityEditor.PackageManager.UI
{
internal class PackageAssetPostprocessor : AssetPostprocessor
{
static bool IsPackageJsonAsset(string path)
{
var pathComponents = (path ?? "").Split('/');
return pathComponents.Length == 3 && pathComponents[0] == "Packages" && pathComponents[2] == "package.json";
}
static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
{
if (PackageCollection.Instance != null && (importedAssets.Any(IsPackageJsonAsset) || deletedAssets.Any(IsPackageJsonAsset) || movedAssets.Any(IsPackageJsonAsset)))
{
PackageCollection.Instance.FetchListOfflineCache(true);
}
}
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 63e8a6023745e4347bb661e87a9be1d9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,284 @@
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace UnityEditor.PackageManager.UI
{
[Serializable]
internal class PackageCollection
{
private static PackageCollection instance = new PackageCollection();
public static PackageCollection Instance { get { return instance; } }
public event Action<IEnumerable<Package>> OnPackagesChanged = delegate { };
public event Action<PackageFilter> OnFilterChanged = delegate { };
private readonly Dictionary<string, Package> packages;
private PackageFilter filter;
private string selectedListPackage;
private string selectedSearchPackage;
internal string lastUpdateTime;
private List<PackageInfo> listPackagesOffline;
private List<PackageInfo> listPackages;
private List<PackageInfo> searchPackages;
private List<PackageError> packageErrors;
private int listPackagesVersion;
private int listPackagesOfflineVersion;
private bool searchOperationOngoing;
private bool listOperationOngoing;
private bool listOperationOfflineOngoing;
private IListOperation listOperationOffline;
private IListOperation listOperation;
private ISearchOperation searchOperation;
public readonly OperationSignal<ISearchOperation> SearchSignal = new OperationSignal<ISearchOperation>();
public readonly OperationSignal<IListOperation> ListSignal = new OperationSignal<IListOperation>();
public static void InitInstance(ref PackageCollection value)
{
if (value == null) // UI window opened
{
value = instance;
Instance.OnPackagesChanged = delegate { };
Instance.OnFilterChanged = delegate { };
Instance.SearchSignal.ResetEvents();
Instance.ListSignal.ResetEvents();
Instance.FetchListOfflineCache(true);
Instance.FetchListCache(true);
Instance.FetchSearchCache(true);
}
else // Domain reload
{
instance = value;
Instance.RebuildPackageDictionary();
// Resume operations interrupted by domain reload
Instance.FetchListOfflineCache(Instance.listOperationOfflineOngoing);
Instance.FetchListCache(Instance.listOperationOngoing);
Instance.FetchSearchCache(Instance.searchOperationOngoing);
}
}
public PackageFilter Filter
{
get { return filter; }
// For public usage, use SetFilter() instead
private set
{
var changed = value != filter;
filter = value;
if (changed)
OnFilterChanged(filter);
}
}
public List<PackageInfo> LatestListPackages
{
get { return listPackagesVersion > listPackagesOfflineVersion? listPackages : listPackagesOffline; }
}
public List<PackageInfo> LatestSearchPackages { get { return searchPackages; } }
public string SelectedPackage
{
get { return PackageFilter.All == Filter ? selectedSearchPackage : selectedListPackage; }
set
{
if (PackageFilter.All == Filter)
selectedSearchPackage = value;
else
selectedListPackage = value;
}
}
private PackageCollection()
{
packages = new Dictionary<string, Package>();
listPackagesOffline = new List<PackageInfo>();
listPackages = new List<PackageInfo>();
searchPackages = new List<PackageInfo>();
packageErrors = new List<PackageError>();
listPackagesVersion = 0;
listPackagesOfflineVersion = 0;
searchOperationOngoing = false;
listOperationOngoing = false;
listOperationOfflineOngoing = false;
Filter = PackageFilter.All;
}
public bool SetFilter(PackageFilter value, bool refresh = true)
{
if (value == Filter)
return false;
Filter = value;
if (refresh)
{
UpdatePackageCollection();
}
return true;
}
public void UpdatePackageCollection(bool rebuildDictionary = false)
{
if (rebuildDictionary)
{
lastUpdateTime = DateTime.Now.ToString("HH:mm");
RebuildPackageDictionary();
}
if (packages.Any())
OnPackagesChanged(OrderedPackages());
}
internal void FetchListOfflineCache(bool forceRefetch = false)
{
if (!forceRefetch && (listOperationOfflineOngoing || listPackagesOffline.Any())) return;
if (listOperationOffline != null)
listOperationOffline.Cancel();
listOperationOfflineOngoing = true;
listOperationOffline = OperationFactory.Instance.CreateListOperation(true);
listOperationOffline.OnOperationFinalized += () =>
{
listOperationOfflineOngoing = false;
UpdatePackageCollection(true);
};
listOperationOffline.GetPackageListAsync(
infos =>
{
var version = listPackagesVersion;
UpdateListPackageInfosOffline(infos, version);
},
error => { Debug.LogError("Error fetching package list (offline mode)."); });
}
internal void FetchListCache(bool forceRefetch = false)
{
if (!forceRefetch && (listOperationOngoing || listPackages.Any())) return;
if (listOperation != null)
listOperation.Cancel();
listOperationOngoing = true;
listOperation = OperationFactory.Instance.CreateListOperation();
listOperation.OnOperationFinalized += () =>
{
listOperationOngoing = false;
UpdatePackageCollection(true);
};
listOperation.GetPackageListAsync(UpdateListPackageInfos,
error => { Debug.LogError("Error fetching package list."); });
ListSignal.SetOperation(listOperation);
}
internal void FetchSearchCache(bool forceRefetch = false)
{
if (!forceRefetch && (searchOperationOngoing || searchPackages.Any())) return;
if (searchOperation != null)
searchOperation.Cancel();
searchOperationOngoing = true;
searchOperation = OperationFactory.Instance.CreateSearchOperation();
searchOperation.OnOperationFinalized += () =>
{
searchOperationOngoing = false;
UpdatePackageCollection(true);
};
searchOperation.GetAllPackageAsync(UpdateSearchPackageInfos,
error => { Debug.LogError("Error searching packages online."); });
SearchSignal.SetOperation(searchOperation);
}
private void UpdateListPackageInfosOffline(IEnumerable<PackageInfo> newInfos, int version)
{
listPackagesOfflineVersion = version;
listPackagesOffline = newInfos.Where(p => p.IsUserVisible).ToList();
}
private void UpdateListPackageInfos(IEnumerable<PackageInfo> newInfos)
{
// Each time we fetch list packages, the cache for offline mode will be updated
// We keep track of the list packages version so that we know which version of cache
// we are getting with the offline fetch operation.
listPackagesVersion++;
listPackages = newInfos.Where(p => p.IsUserVisible).ToList();
listPackagesOffline = listPackages;
}
private void UpdateSearchPackageInfos(IEnumerable<PackageInfo> newInfos)
{
searchPackages = newInfos.Where(p => p.IsUserVisible).ToList();
}
private IEnumerable<Package> OrderedPackages()
{
return packages.Values.OrderBy(pkg => pkg.Versions.LastOrDefault() == null ? pkg.Name : pkg.Versions.Last().DisplayName).AsEnumerable();
}
public Package GetPackageByName(string name)
{
Package package;
packages.TryGetValue(name, out package);
return package;
}
public Error GetPackageError(Package package)
{
if (null == package) return null;
var firstMatchingError = packageErrors.FirstOrDefault(p => p.PackageName == package.Name);
return firstMatchingError != null ? firstMatchingError.Error : null;
}
public void AddPackageError(Package package, Error error)
{
if (null == package || null == error) return;
packageErrors.Add(new PackageError(package.Name, error));
}
public void RemovePackageErrors(Package package)
{
if (null == package) return;
packageErrors.RemoveAll(p => p.PackageName == package.Name);
}
private void RebuildPackageDictionary()
{
// Merge list & search packages
var allPackageInfos = new List<PackageInfo>(LatestListPackages);
var installedPackageIds = new HashSet<string>(allPackageInfos.Select(p => p.PackageId));
allPackageInfos.AddRange(searchPackages.Where(p => !installedPackageIds.Contains(p.PackageId)));
if (!PackageManagerPrefs.ShowPreviewPackages)
{
allPackageInfos = allPackageInfos.Where(p => !p.IsPreRelease || installedPackageIds.Contains(p.PackageId)).ToList();
}
// Rebuild packages dictionary
packages.Clear();
foreach (var p in allPackageInfos)
{
var packageName = p.Name;
if (packages.ContainsKey(packageName))
continue;
var packageQuery = from pkg in allPackageInfos where pkg.Name == packageName select pkg;
var package = new Package(packageName, packageQuery);
packages[packageName] = package;
}
}
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 61d72cb49da3040d5ade3edfd6eccfc1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,17 @@
using System;
namespace UnityEditor.PackageManager.UI
{
[Serializable]
internal class PackageError
{
public string PackageName;
public Error Error;
public PackageError(string packageName, Error error)
{
PackageName = packageName;
Error = error;
}
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b7c10e584b708734ba6141e7d4797931
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,13 @@
using System;
namespace UnityEditor.PackageManager.UI
{
[Serializable]
internal enum PackageFilter
{
None,
All,
Local,
Modules
}
}

Some files were not shown because too many files have changed in this diff Show more