update
8
.idea/.idea.HALLUCINATE/.idea/workspace.xml
generated
@@ -6,6 +6,10 @@
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="f9183c68-daf0-43b8-be4c-fad79983f91b" name="Changes" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/.idea.HALLUCINATE/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.HALLUCINATE/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Figma/Fonts/Inter_900_SDF.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Figma/Fonts/Inter_900_SDF.asset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scove/UITesting.unity" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scove/UITesting.unity" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Packages/manifest.json" beforeDir="false" afterPath="$PROJECT_DIR$/Packages/manifest.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Packages/packages-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/Packages/packages-lock.json" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@@ -13,7 +17,6 @@
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="EmbeddingIndexingInfo">
|
||||
<option name="cachedIndexableFilesCount" value="28" />
|
||||
<option name="fileBasedEmbeddingIndicesEnabled" value="true" />
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
@@ -25,6 +28,7 @@
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Scripts/UI/LobbyController.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Third Parties/Photon/Fusion/Editor/Fusion.Unity.Editor.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/UI/MainPanelSettings.asset" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.simonoliver.unityfigma@0e2fd2f81142/UnityFigmaBridge/Runtime/UI/FigmaImage.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.unity.render-pipelines.core@04ab0eefa0c3/Editor/Utilities/LocalizationHelper.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.unity.timeline@7f8b2fb101b6/Editor/Localization/Localization.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.wooshii.foldericons@201a18f355d3/FolderIcons/Editor/FolderIcons.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
@@ -160,6 +164,7 @@
|
||||
<workItem from="1777818351880" duration="313000" />
|
||||
<workItem from="1777991464807" duration="4843000" />
|
||||
<workItem from="1778823297204" duration="10000" />
|
||||
<workItem from="1779037122622" duration="1464000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
@@ -169,6 +174,7 @@
|
||||
<component name="UnityCheckinConfiguration" checkUnsavedScenes="true" />
|
||||
<component name="UnityProjectConfiguration" hasMinimizedUI="true" />
|
||||
<component name="UnityProjectDiscoverer">
|
||||
<option name="hasUnityReference" value="true" />
|
||||
<option name="unityProject" value="true" />
|
||||
<option name="unityProjectFolder" value="true" />
|
||||
</component>
|
||||
|
||||
@@ -447,6 +447,75 @@ RectTransform:
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!1 &1218059261
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1218059262}
|
||||
- component: {fileID: 1218059264}
|
||||
- component: {fileID: 1218059263}
|
||||
m_Layer: 0
|
||||
m_Name: GameObject
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1218059262
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1218059261}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 4687.4375, y: -0.00017, z: 5715.602}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1218059263
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1218059261}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -688943309, guid: 178891466f3f1d447aa5cfbf83d7a8b5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UXImporterUnityUiToolKit.dll::FigmaToUnityUiToolKit.DataHubRoot
|
||||
_dataHub: {fileID: 0}
|
||||
--- !u!114 &1218059264
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1218059261}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.dll::UnityEngine.UIElements.UIDocument
|
||||
m_PanelSettings: {fileID: 0}
|
||||
m_ParentUI: {fileID: 0}
|
||||
sourceAsset: {fileID: 0}
|
||||
m_SortingOrder: 0
|
||||
m_Position: 0
|
||||
m_WorldSpaceSizeMode: 1
|
||||
m_WorldSpaceWidth: 1920
|
||||
m_WorldSpaceHeight: 1080
|
||||
m_PivotReferenceSize: 0
|
||||
m_Pivot: 0
|
||||
m_WorldSpaceCollider: {fileID: 0}
|
||||
--- !u!1 &1234188887
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -586,6 +655,14 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: Game_UI
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4705652128730820444, guid: dbc10f9802034f443bd0ac18329875c5, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4705652128730820444, guid: dbc10f9802034f443bd0ac18329875c5, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5704081308080066381, guid: dbc10f9802034f443bd0ac18329875c5, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0
|
||||
@@ -800,3 +877,4 @@ SceneRoots:
|
||||
- {fileID: 1234188889}
|
||||
- {fileID: 671850023}
|
||||
- {fileID: 705824387}
|
||||
- {fileID: 1218059262}
|
||||
|
||||
8
Assets/Temp.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d120eab0fb2b73041b12a7af764c2966
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
2111
Assets/Temp/Section_1.json
Normal file
7
Assets/Temp/Section_1.json.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 27b1b7c76d74f1a4b823e2cea76aa62c
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Temp/images.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7b94eafedddb0c04d974ba1c8fa25843
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Temp/images/2013_123.png
Normal file
|
After Width: | Height: | Size: 4.2 MiB |
130
Assets/Temp/images/2013_123.png.meta
Normal file
@@ -0,0 +1,130 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e3f5cc198f705e84a80152d1d3c18ec3
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Temp/images/2013_129.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
130
Assets/Temp/images/2013_129.png.meta
Normal file
@@ -0,0 +1,130 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d0d24ca34a852eb40ac7a722a0004fb7
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Temp/images/2013_130.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
130
Assets/Temp/images/2013_130.png.meta
Normal file
@@ -0,0 +1,130 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e67c60a36198d04485cb81643e360b1
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Temp/images/2013_133.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
130
Assets/Temp/images/2013_133.png.meta
Normal file
@@ -0,0 +1,130 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a382aca638da8b64ca42bad0b839d00c
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Temp/images/2013_81.png
Normal file
|
After Width: | Height: | Size: 3.1 MiB |
130
Assets/Temp/images/2013_81.png.meta
Normal file
@@ -0,0 +1,130 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 067507b989868c64084dabb40d85ab19
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/UXImporterUnityUiToolKit.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9c962719e2f05ae47bdc320ee7ff2e54
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1 @@
|
||||
No previous session history found for this workspace.
|
||||
6
Assets/UXImporterUnityUiToolKit/CHANGELOG.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# Changelog
|
||||
|
||||
## [0.1.6] - 2025-12-29
|
||||
### Fixed
|
||||
- Fixed a bug where `unity-text-align` was output instead of `-unity-text-align`.
|
||||
- Fixed an issue where Addressable Group Schemas were incorrectly instantiated using `new`.
|
||||
14
Assets/UXImporterUnityUiToolKit/CHANGELOG.md.meta
Normal file
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2198b75ff830ac24396d1481f8817f55
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 337438
|
||||
packageName: UX Importer for UI Toolkit
|
||||
packageVersion: 0.1.6
|
||||
assetPath: Assets/UXImporterUnityUiToolKit/CHANGELOG.md
|
||||
uploadId: 840350
|
||||
8
Assets/UXImporterUnityUiToolKit/Editor.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2b1e9d8f8b3babc4e92a9dcd30d5d6a4
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/UXImporterUnityUiToolKit/Editor/JsonDiffPatchDotNet.dll
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: db12bd705fb15ce4888fb9e049cb5359
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 337438
|
||||
packageName: UX Importer for UI Toolkit
|
||||
packageVersion: 0.1.6
|
||||
assetPath: Assets/UXImporterUnityUiToolKit/Editor/JsonDiffPatchDotNet.dll
|
||||
uploadId: 840350
|
||||
8
Assets/UXImporterUnityUiToolKit/Editor/ToolAsset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: df91b23b175eb104589b3f0c20c4668a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,48 @@
|
||||
/* ヘッダー */
|
||||
.header {
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 5px;
|
||||
background-color: rgb(56, 56, 56);
|
||||
}
|
||||
|
||||
.title {
|
||||
-unity-font-style: bold;
|
||||
font-size: 14px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
ScrollView {
|
||||
background-color: #383838;
|
||||
border-width: 1px;
|
||||
border-color: #2b2b2b;
|
||||
border-radius: 4px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
Button {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.label-fixed-width .unity-label {
|
||||
min-width: 220px;
|
||||
max-width: 220px;
|
||||
}
|
||||
|
||||
#exportButton {
|
||||
height: 30px;
|
||||
width: 90%;
|
||||
font-size: 14px;
|
||||
align-self: center;
|
||||
border-width: 1px;
|
||||
border-color: white;
|
||||
}
|
||||
|
||||
#cancelImportButton {
|
||||
height: 30px;
|
||||
width: 90%;
|
||||
font-size: 14px;
|
||||
align-self: center;
|
||||
margin-top: 5px;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 163109c4175a61c4a893aa85977bce79
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}
|
||||
disableValidation: 0
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 337438
|
||||
packageName: UX Importer for UI Toolkit
|
||||
packageVersion: 0.1.6
|
||||
assetPath: Assets/UXImporterUnityUiToolKit/Editor/ToolAsset/UXImporterToUITK.uss
|
||||
uploadId: 840350
|
||||
@@ -0,0 +1,33 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements">
|
||||
<!-- スタイルシートを読み込みます -->
|
||||
<ui:Style src="UXImporterToUITK.uss" />
|
||||
|
||||
<!-- ヘッダー部分 -->
|
||||
<ui:VisualElement name="header" class="header">
|
||||
<ui:Label text="UX Importer for Unity UI Toolkit" class="title" />
|
||||
<uie:ToolbarMenu name="language-menu" />
|
||||
</ui:VisualElement>
|
||||
|
||||
<!-- メインコンテンツ -->
|
||||
<ui:ScrollView>
|
||||
<ui:Label name="inputSettingsLabel" text="Input Settings" style="-unity-font-style: bold;" />
|
||||
<ui:VisualElement style="height: 5px; border-bottom-width: 1px; border-bottom-color: #555;" />
|
||||
<uie:ObjectField name="jsonAssetField" class="label-fixed-width" />
|
||||
<ui:VisualElement style="height: 10px;" />
|
||||
<ui:Label name="outputSettingsLabel" text="Output Settings" style="-unity-font-style: bold;" />
|
||||
<ui:VisualElement style="height: 5px; border-bottom-width: 1px; border-bottom-color: #555;" />
|
||||
<uie:ObjectField name="outputDirectoryField" class="label-fixed-width" />
|
||||
<uie:ObjectField name="figmaUIRootField" class="label-fixed-width" />
|
||||
<ui:VisualElement style="height: 10px;" />
|
||||
<ui:Label name="referenceSettingsLabel" text="Reference Settings" style="-unity-font-style: bold;" />
|
||||
<ui:VisualElement style="height: 5px; border-bottom-width: 1px; border-bottom-color: #555;" />
|
||||
<uie:ObjectField name="outputLocalizationField" class="label-fixed-width" />
|
||||
<ui:VisualElement style="height: 10px;" />
|
||||
<ui:Label name="fontSettingsLabel" text="Font Settings" style="-unity-font-style: bold;" />
|
||||
<ui:VisualElement style="height: 5px; border-bottom-width: 1px; border-bottom-color: #555;" />
|
||||
<uie:ObjectField name="defaultFontField" label="Default Font" class="label-fixed-width" />
|
||||
<ui:VisualElement style="height: 10px;" />
|
||||
<ui:Button text="Load Json and Export" name="exportButton" id="exportButton" />
|
||||
<ui:Button name="cancelImportButton" id="cancelImportButton" />
|
||||
</ui:ScrollView>
|
||||
</ui:UXML>
|
||||
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5c5ecbe294d46374b83b27654f8e8ffe
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 337438
|
||||
packageName: UX Importer for UI Toolkit
|
||||
packageVersion: 0.1.6
|
||||
assetPath: Assets/UXImporterUnityUiToolKit/Editor/ToolAsset/UXImporterToUITK.uxml
|
||||
uploadId: 840350
|
||||
8
Assets/UXImporterUnityUiToolKit/Editor/UIAsset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 25e9b1edf68820246aa2c364dccef6c3
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,58 @@
|
||||
/* ヘッダー */
|
||||
.header {
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 5px 5px 5px;
|
||||
border-bottom: 1px solid rgb(56, 56, 56);
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Inspector全体のコンテナ */
|
||||
.root-container {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.title {
|
||||
-unity-font-style: bold;
|
||||
font-size: 14px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* 警告メッセージのラベル */
|
||||
.warning-label {
|
||||
font-size: 14px;
|
||||
padding: 10px 5px;
|
||||
white-space: normal; /* テキストの折り返しを許可 */
|
||||
}
|
||||
|
||||
/* 区切り線 */
|
||||
.separator {
|
||||
height: 1px;
|
||||
background-color: rgb(56, 56, 56);
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
/* テーブルリストのセクション */
|
||||
.tables-section {
|
||||
padding: 10px 5px;
|
||||
}
|
||||
|
||||
/* テーブルリストのタイトル */
|
||||
.title-label {
|
||||
-unity-font-style: bold;
|
||||
font-size: 14px;
|
||||
margin-bottom: 5px;
|
||||
white-space: normal; /* テキストの折り返しを許可 */
|
||||
}
|
||||
|
||||
/* テーブル名リストのコンテナ */
|
||||
.list-container {}
|
||||
|
||||
/* 個々のテーブル名のラベル */
|
||||
.table-name-label {
|
||||
margin-left: 15px; /* リスト項目をインデント */
|
||||
padding: 1px 0;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 71de67d97a4bd4345a4a2ef330ca58fb
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}
|
||||
disableValidation: 0
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 337438
|
||||
packageName: UX Importer for UI Toolkit
|
||||
packageVersion: 0.1.6
|
||||
assetPath: Assets/UXImporterUnityUiToolKit/Editor/UIAsset/DataHubEditor.uss
|
||||
uploadId: 840350
|
||||
@@ -0,0 +1,36 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements">
|
||||
<!-- スタイルシートをリンクします -->
|
||||
<ui:Style src="DataHubEditor.uss" />
|
||||
|
||||
<!-- ヘッダー部分 -->
|
||||
<ui:VisualElement name="header" class="header">
|
||||
<ui:Label text="DataHub" class="title" />
|
||||
<uie:ToolbarMenu name="language-menu" />
|
||||
</ui:VisualElement>
|
||||
|
||||
<!-- Inspector全体のコンテナ -->
|
||||
<ui:VisualElement name="inspector-root" class="root-container">
|
||||
|
||||
<!-- セクション1: 警告メッセージ -->
|
||||
<ui:Label name="warning-label" class="warning-label" />
|
||||
|
||||
<!-- 区切り線 -->
|
||||
<ui:VisualElement name="separator" class="separator" />
|
||||
|
||||
<!-- セクション2: LocalizationTableのリスト -->
|
||||
<ui:VisualElement name="tables-section" class="tables-section">
|
||||
<ui:Label name="tables-title-label" class="title-label" />
|
||||
<ui:VisualElement name="tables-list-container" class="list-container" />
|
||||
</ui:VisualElement>
|
||||
|
||||
<!-- 区切り線 -->
|
||||
<ui:VisualElement name="addressables-separator" class="separator" />
|
||||
|
||||
<!-- セクション3: Addressables Groupのリスト -->
|
||||
<ui:VisualElement name="addressables-section" class="tables-section">
|
||||
<ui:Label name="addressables-title-label" class="title-label" />
|
||||
<ui:VisualElement name="addressables-list-container" class="list-container" />
|
||||
</ui:VisualElement>
|
||||
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
||||
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7c99c36ae4294b54b9012a7074087582
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 337438
|
||||
packageName: UX Importer for UI Toolkit
|
||||
packageVersion: 0.1.6
|
||||
assetPath: Assets/UXImporterUnityUiToolKit/Editor/UIAsset/DataHubEditor.uxml
|
||||
uploadId: 840350
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 570e536497cc67846b92166e0bbd644e
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 337438
|
||||
packageName: UX Importer for UI Toolkit
|
||||
packageVersion: 0.1.6
|
||||
assetPath: Assets/UXImporterUnityUiToolKit/Editor/UXImporterUnityUiToolKit.Editor.dll
|
||||
uploadId: 840350
|
||||
68
Assets/UXImporterUnityUiToolKit/README.md
Normal file
@@ -0,0 +1,68 @@
|
||||
# UX Importer for Unity UI Toolkit
|
||||
|
||||
## Description
|
||||
|
||||
**UX Importer for Unity UI Toolkit** is a toolset for converting UI designs created in **external design platforms** into Unity's UI Toolkit format (UXML and USS). It consists of the **UX Exporter plugin** and a Unity editor extension, smoothing the collaboration between designers and developers.
|
||||
|
||||
|
||||
Export a JSON file with all scene information and necessary asset files as a ZIP using the **UX Exporter plugin**. Simply import that ZIP file into your Unity project to faithfully reproduce the layout from the original design.
|
||||
|
||||
|
||||
Please obtain the UX Exporter plugin here.
|
||||
https://bamboo-up.app/
|
||||
|
||||
## Workflow
|
||||
|
||||
1. **Design Creation**:
|
||||
* The designer creates the UI design in the external design platform.
|
||||
|
||||
2. **Design Export**:
|
||||
* Use the **UX Exporter plugin** (available for download at [https://bamboo-up.app/](https://bamboo-up.app/)) to export the design as a **ZIP file containing the JSON data and required image assets**.
|
||||
|
||||
3. **Placement in Unity Project**:
|
||||
* **Unzip** the exported ZIP file and place its contents (the JSON file and assets) into any folder within your Unity project (e.g., `Assets/DesignExports/`).
|
||||
|
||||
4. **Scene Setup (DataHub Root)**:
|
||||
* In your Unity scene, add a new GameObject and attach the **`DataHub Root` component** to it. This component is essential for centralizing references to Addressables and Localization data, and it will serve as the **parent object for the generated UI structure**.
|
||||
|
||||
5. **UXML/USS Automatic Generation**:
|
||||
* After Unity recognizes the JSON file, launch the tool from the editor menu: `Window/BambooUp studio/UX Importer for UUIT`.
|
||||
* Within the tool, specify the JSON file to automatically generate the **UXML and USS stylesheets** ready for use with the UI Toolkit.
|
||||
|
||||
## Tool Configuration
|
||||
|
||||
The following settings must be configured within the GUI of the "UX Importer for Unity UI Toolkit" import tool.
|
||||
|
||||
### 1. Input Settings
|
||||
|
||||
| Item | Description |
|
||||
| :--- | :--- |
|
||||
| **JSON File** | Specify the JSON file containing the design information exported by the UX Exporter plugin. |
|
||||
|
||||
### 2. Output Settings
|
||||
|
||||
| Item | Description |
|
||||
| :--- | :--- |
|
||||
| **Output Folder** | Specify the project folder where the generated **UXML files**, **USS stylesheets**, and **DataHub files** will be saved. |
|
||||
| **DataHub Root Reference** | Specify the **`DataHub Root` component** placed in your scene. The generated UI will be structured as a child of this root. |
|
||||
|
||||
### 3. Localization Settings
|
||||
|
||||
| Item | Description |
|
||||
| :--- | :--- |
|
||||
| **Localization Asset Folder** | Specify the folder where **assets like String Tables** generated by the Unity Localization package will be stored. |
|
||||
|
||||
### 4. Font Settings
|
||||
|
||||
| Item | Description |
|
||||
| :--- | :--- |
|
||||
| **Default Font** | Specify a default font asset to be used as a substitute if a font utilized in the original design cannot be found in the Unity project. |
|
||||
|
||||
***
|
||||
|
||||
## Operations (Import and Undo)
|
||||
|
||||
| Operation | Description |
|
||||
| :--- | :--- |
|
||||
| **Execute Import** | Reads the JSON file based on the settings above and generates the UXML/USS and associated assets. |
|
||||
| **Undo Import** | Reverts (deletes) the results of the last executed import operation (UXML/USS and DataHub files, etc.) from the specified output folder. |
|
||||
14
Assets/UXImporterUnityUiToolKit/README.md.meta
Normal file
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 16b2182b71b79594e844b2633b67893c
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 337438
|
||||
packageName: UX Importer for UI Toolkit
|
||||
packageVersion: 0.1.6
|
||||
assetPath: Assets/UXImporterUnityUiToolKit/README.md
|
||||
uploadId: 840350
|
||||
8
Assets/UXImporterUnityUiToolKit/Runtime.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a7654789c6e0fd743adf5c5b63f14613
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 178891466f3f1d447aa5cfbf83d7a8b5
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 337438
|
||||
packageName: UX Importer for UI Toolkit
|
||||
packageVersion: 0.1.6
|
||||
assetPath: Assets/UXImporterUnityUiToolKit/Runtime/UXImporterUnityUiToolKit.dll
|
||||
uploadId: 840350
|
||||
15610
Assets/UXImporterUnityUiToolKit/Samples~/Section_1.json
Normal file
14
Assets/UXImporterUnityUiToolKit/Samples~/Section_1.json.meta
Normal file
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9144bda9da4042e46b218021a2cb1fc6
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 337438
|
||||
packageName: UX Importer for UI Toolkit
|
||||
packageVersion: 0.1.6
|
||||
assetPath: Assets/UXImporterUnityUiToolKit/Samples~/Section_1.json
|
||||
uploadId: 840350
|
||||
8
Assets/UXImporterUnityUiToolKit/Samples~/images.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0c31d5a1c107d84449b8cdf9df232c74
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/UXImporterUnityUiToolKit/Samples~/images/1_2838.png
Normal file
|
After Width: | Height: | Size: 574 KiB |
176
Assets/UXImporterUnityUiToolKit/Samples~/images/1_2838.png.meta
Normal file
@@ -0,0 +1,176 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 73df4b0258a57fb4b855b1c40d10f007
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: 8296603484774243167
|
||||
second: 1_2838_0
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 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
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: 1_2838_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 745
|
||||
height: 496
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: f5b9c3089e4732370800000000000000
|
||||
internalID: 8296603484774243167
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
1_2838_0: 8296603484774243167
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 337438
|
||||
packageName: UX Importer for UI Toolkit
|
||||
packageVersion: 0.1.6
|
||||
assetPath: Assets/UXImporterUnityUiToolKit/Samples~/images/1_2838.png
|
||||
uploadId: 840350
|
||||
BIN
Assets/UXImporterUnityUiToolKit/Samples~/images/1_4.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
566
Assets/UXImporterUnityUiToolKit/Samples~/images/1_4.png.meta
Normal file
@@ -0,0 +1,566 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 07a2ddb3d22d81941933030cb6104e84
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: 8701536793483841217
|
||||
second: 1_4_0
|
||||
- first:
|
||||
213: 4028147025107103418
|
||||
second: 1_4_1
|
||||
- first:
|
||||
213: 1696690814626827625
|
||||
second: 1_4_2
|
||||
- first:
|
||||
213: -9177709588812855905
|
||||
second: 1_4_3
|
||||
- first:
|
||||
213: -4406997876285760549
|
||||
second: 1_4_4
|
||||
- first:
|
||||
213: 769531209855814171
|
||||
second: 1_4_5
|
||||
- first:
|
||||
213: 1721244276369096483
|
||||
second: 1_4_6
|
||||
- first:
|
||||
213: -764220898350697420
|
||||
second: 1_4_7
|
||||
- first:
|
||||
213: -1995208836754739062
|
||||
second: 1_4_8
|
||||
- first:
|
||||
213: -919976197542032215
|
||||
second: 1_4_9
|
||||
- first:
|
||||
213: -2493183070980483332
|
||||
second: 1_4_10
|
||||
- first:
|
||||
213: 3001159265717173800
|
||||
second: 1_4_11
|
||||
- first:
|
||||
213: 8503814912390575643
|
||||
second: 1_4_12
|
||||
- first:
|
||||
213: 4375764953586769622
|
||||
second: 1_4_13
|
||||
- first:
|
||||
213: -5658511782964457158
|
||||
second: 1_4_14
|
||||
- first:
|
||||
213: 7118892559982389784
|
||||
second: 1_4_15
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 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
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: 1_4_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 102
|
||||
height: 117
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 1ce88976c9112c870800000000000000
|
||||
internalID: 8701536793483841217
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: 1_4_1
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 120
|
||||
y: 45
|
||||
width: 33
|
||||
height: 44
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: abe2e86906ad6e730800000000000000
|
||||
internalID: 4028147025107103418
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: 1_4_2
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 240
|
||||
y: 44
|
||||
width: 33
|
||||
height: 45
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 96d00837e4bdb8710800000000000000
|
||||
internalID: 1696690814626827625
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: 1_4_3
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 342
|
||||
y: 45
|
||||
width: 34
|
||||
height: 44
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: f950d1b21c932a080800000000000000
|
||||
internalID: -9177709588812855905
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: 1_4_4
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 363
|
||||
y: 85
|
||||
width: 28
|
||||
height: 25
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: bdb1612e7c237d2c0800000000000000
|
||||
internalID: -4406997876285760549
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: 1_4_5
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 154
|
||||
y: 45
|
||||
width: 30
|
||||
height: 33
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: b1a4807ee8cedaa00800000000000000
|
||||
internalID: 769531209855814171
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: 1_4_6
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 189
|
||||
y: 46
|
||||
width: 48
|
||||
height: 32
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 32f77a0cc8613e710800000000000000
|
||||
internalID: 1721244276369096483
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: 1_4_7
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 276
|
||||
y: 45
|
||||
width: 28
|
||||
height: 33
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 43470e75421f465f0800000000000000
|
||||
internalID: -764220898350697420
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: 1_4_8
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 307
|
||||
y: 44
|
||||
width: 31
|
||||
height: 35
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: a80738052289f44e0800000000000000
|
||||
internalID: -1995208836754739062
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: 1_4_9
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 379
|
||||
y: 34
|
||||
width: 34
|
||||
height: 47
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 9ac41b7c5869b33f0800000000000000
|
||||
internalID: -919976197542032215
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: 1_4_10
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 228
|
||||
y: 22
|
||||
width: 10
|
||||
height: 14
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: cf6d036d43f666dd0800000000000000
|
||||
internalID: -2493183070980483332
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: 1_4_11
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 239
|
||||
y: 22
|
||||
width: 11
|
||||
height: 14
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 82eb17b837246a920800000000000000
|
||||
internalID: 3001159265717173800
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: 1_4_12
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 252
|
||||
y: 22
|
||||
width: 12
|
||||
height: 14
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: b16b5b09b9e930670800000000000000
|
||||
internalID: 8503814912390575643
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: 1_4_13
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 267
|
||||
y: 22
|
||||
width: 13
|
||||
height: 14
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 6de942f9a07d9bc30800000000000000
|
||||
internalID: 4375764953586769622
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: 1_4_14
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 281
|
||||
y: 22
|
||||
width: 6
|
||||
height: 14
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: a319a03738de871b0800000000000000
|
||||
internalID: -5658511782964457158
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: 1_4_15
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 289
|
||||
y: 21
|
||||
width: 14
|
||||
height: 15
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 81aebe7d0136bc260800000000000000
|
||||
internalID: 7118892559982389784
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
1_4_0: 8701536793483841217
|
||||
1_4_1: 4028147025107103418
|
||||
1_4_10: -2493183070980483332
|
||||
1_4_11: 3001159265717173800
|
||||
1_4_12: 8503814912390575643
|
||||
1_4_13: 4375764953586769622
|
||||
1_4_14: -5658511782964457158
|
||||
1_4_15: 7118892559982389784
|
||||
1_4_2: 1696690814626827625
|
||||
1_4_3: -9177709588812855905
|
||||
1_4_4: -4406997876285760549
|
||||
1_4_5: 769531209855814171
|
||||
1_4_6: 1721244276369096483
|
||||
1_4_7: -764220898350697420
|
||||
1_4_8: -1995208836754739062
|
||||
1_4_9: -919976197542032215
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 337438
|
||||
packageName: UX Importer for UI Toolkit
|
||||
packageVersion: 0.1.6
|
||||
assetPath: Assets/UXImporterUnityUiToolKit/Samples~/images/1_4.png
|
||||
uploadId: 840350
|
||||
BIN
Assets/UXImporterUnityUiToolKit/Samples~/images/4_240.png
Normal file
|
After Width: | Height: | Size: 305 KiB |
176
Assets/UXImporterUnityUiToolKit/Samples~/images/4_240.png.meta
Normal file
@@ -0,0 +1,176 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 726af7a59cc5da648b0c0a2e9400116a
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: 484115968324611160
|
||||
second: 4_240_0
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 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
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: 4_240_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 37
|
||||
y: 0
|
||||
width: 764
|
||||
height: 460
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 85c251288ece7b600800000000000000
|
||||
internalID: 484115968324611160
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
4_240_0: 484115968324611160
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 337438
|
||||
packageName: UX Importer for UI Toolkit
|
||||
packageVersion: 0.1.6
|
||||
assetPath: Assets/UXImporterUnityUiToolKit/Samples~/images/4_240.png
|
||||
uploadId: 840350
|
||||
|
After Width: | Height: | Size: 548 B |
@@ -0,0 +1,176 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 09b8e72e7c2b7f04796fb6dea00d3356
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: 704234606320403687
|
||||
second: I1_1330__83_33578__9762_746__7758_12316_0
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 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
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: I1_1330__83_33578__9762_746__7758_12316_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 19
|
||||
height: 18
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 7e4c34ca4a1f5c900800000000000000
|
||||
internalID: 704234606320403687
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
I1_1330__83_33578__9762_746__7758_12316_0: 704234606320403687
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 337438
|
||||
packageName: UX Importer for UI Toolkit
|
||||
packageVersion: 0.1.6
|
||||
assetPath: Assets/UXImporterUnityUiToolKit/Samples~/images/I1_1330__83_33578__9762_746__7758_12316.png
|
||||
uploadId: 840350
|
||||
|
After Width: | Height: | Size: 548 B |
@@ -0,0 +1,176 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 271ce3adde56b234e86c262cd7e2aed0
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: -3760533499996953978
|
||||
second: I1_1330__83_33579__9762_746__7758_12316_0
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 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
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: I1_1330__83_33579__9762_746__7758_12316_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 19
|
||||
height: 18
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 682a9b6b4b6efcbc0800000000000000
|
||||
internalID: -3760533499996953978
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
I1_1330__83_33579__9762_746__7758_12316_0: -3760533499996953978
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 337438
|
||||
packageName: UX Importer for UI Toolkit
|
||||
packageVersion: 0.1.6
|
||||
assetPath: Assets/UXImporterUnityUiToolKit/Samples~/images/I1_1330__83_33579__9762_746__7758_12316.png
|
||||
uploadId: 840350
|
||||
|
After Width: | Height: | Size: 548 B |
@@ -0,0 +1,176 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8b7299ebe46957f409013901e5c7a85e
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: 2947235425828576907
|
||||
second: I1_1330__83_33580__9762_746__7758_12316_0
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 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
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: I1_1330__83_33580__9762_746__7758_12316_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 19
|
||||
height: 18
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: b8e95f1310fa6e820800000000000000
|
||||
internalID: 2947235425828576907
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
I1_1330__83_33580__9762_746__7758_12316_0: 2947235425828576907
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 337438
|
||||
packageName: UX Importer for UI Toolkit
|
||||
packageVersion: 0.1.6
|
||||
assetPath: Assets/UXImporterUnityUiToolKit/Samples~/images/I1_1330__83_33580__9762_746__7758_12316.png
|
||||
uploadId: 840350
|
||||
|
After Width: | Height: | Size: 134 B |
@@ -0,0 +1,176 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 05a53a2351583654d8950b6b0c27e910
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: 4274827260775113426
|
||||
second: I1_1330__9762_722__9762_732_0
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 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
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: I1_1330__9762_722__9762_732_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 253
|
||||
height: 1
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 2d228a2aebc335b30800000000000000
|
||||
internalID: 4274827260775113426
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
I1_1330__9762_722__9762_732_0: 4274827260775113426
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 337438
|
||||
packageName: UX Importer for UI Toolkit
|
||||
packageVersion: 0.1.6
|
||||
assetPath: Assets/UXImporterUnityUiToolKit/Samples~/images/I1_1330__9762_722__9762_732.png
|
||||
uploadId: 840350
|
||||
|
After Width: | Height: | Size: 134 B |
@@ -0,0 +1,176 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 82eb76f6bec1e0440a1b8e30f261a7e2
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: -3417417015144878424
|
||||
second: I1_1330__9762_724__9762_732_0
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 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
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: I1_1330__9762_724__9762_732_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 253
|
||||
height: 1
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 8aee9eab455e290d0800000000000000
|
||||
internalID: -3417417015144878424
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
I1_1330__9762_724__9762_732_0: -3417417015144878424
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 337438
|
||||
packageName: UX Importer for UI Toolkit
|
||||
packageVersion: 0.1.6
|
||||
assetPath: Assets/UXImporterUnityUiToolKit/Samples~/images/I1_1330__9762_724__9762_732.png
|
||||
uploadId: 840350
|
||||
|
After Width: | Height: | Size: 548 B |
@@ -0,0 +1,176 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c235b3f6e154e6747a1a0759aea9dc1d
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: -3182997598918515724
|
||||
second: I1_1330__9762_726__9762_746__7758_12316_0
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 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
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: I1_1330__9762_726__9762_746__7758_12316_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 19
|
||||
height: 18
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 4f36a8b4c88b3d3d0800000000000000
|
||||
internalID: -3182997598918515724
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
I1_1330__9762_726__9762_746__7758_12316_0: -3182997598918515724
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 337438
|
||||
packageName: UX Importer for UI Toolkit
|
||||
packageVersion: 0.1.6
|
||||
assetPath: Assets/UXImporterUnityUiToolKit/Samples~/images/I1_1330__9762_726__9762_746__7758_12316.png
|
||||
uploadId: 840350
|
||||
|
After Width: | Height: | Size: 548 B |
@@ -0,0 +1,176 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 23e35d2cae0fb9343969156ae3486fee
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: -7639577035823877502
|
||||
second: I1_1330__9762_727__9762_746__7758_12316_0
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 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
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: I1_1330__9762_727__9762_746__7758_12316_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 19
|
||||
height: 18
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 2827c718925caf590800000000000000
|
||||
internalID: -7639577035823877502
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
I1_1330__9762_727__9762_746__7758_12316_0: -7639577035823877502
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 337438
|
||||
packageName: UX Importer for UI Toolkit
|
||||
packageVersion: 0.1.6
|
||||
assetPath: Assets/UXImporterUnityUiToolKit/Samples~/images/I1_1330__9762_727__9762_746__7758_12316.png
|
||||
uploadId: 840350
|
||||
17
Assets/UXImporterUnityUiToolKit/Third Party Notices.md
Normal file
@@ -0,0 +1,17 @@
|
||||
This package contains third-party software components governed by the license(s) indicated below:
|
||||
|
||||
---
|
||||
|
||||
Component(s): Newtonsoft.Json, JsonDiffPatch.NET
|
||||
License: MIT License
|
||||
|
||||
MIT License Text:
|
||||
|
||||
Copyright (c) 2007 James Newton-King (for Newtonsoft.Json)
|
||||
Copyright (c) 2016 William Bishop (for JsonDiffPatch.NET)
|
||||
|
||||
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.
|
||||
14
Assets/UXImporterUnityUiToolKit/Third Party Notices.md.meta
Normal file
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0c7110fc190671e48967d4a9ee98e397
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 337438
|
||||
packageName: UX Importer for UI Toolkit
|
||||
packageVersion: 0.1.6
|
||||
assetPath: Assets/UXImporterUnityUiToolKit/Third Party Notices.md
|
||||
uploadId: 840350
|
||||
27
Assets/UXImporterUnityUiToolKit/package.json
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "app.bamboo-up.uximporterforuitoolkit",
|
||||
"version": "0.1.6",
|
||||
"displayName": "UX Importer for UI Toolkit",
|
||||
"description": "Import UX into the Unity UI Toolkit to establish your UI development starting point. Directly loading exported JSON design data streamlines the manual UI construction process.",
|
||||
"unity": "6000.2",
|
||||
"unityRelease": "7f1",
|
||||
"dependencies": {
|
||||
"com.unity.localization": "1.5.8",
|
||||
"com.unity.addressables": "2.7.3"
|
||||
},
|
||||
"keywords": [
|
||||
"UI Toolkit",
|
||||
"Unity",
|
||||
"Editor",
|
||||
"UX",
|
||||
"Importer",
|
||||
"Design",
|
||||
"Workflow"
|
||||
],
|
||||
"author": {
|
||||
"name": "BambooUp studio",
|
||||
"email": "support@bamboo-up.app",
|
||||
"url": "https://bamboo-up.app/"
|
||||
},
|
||||
"documentationUrl": "https://bamboo-up.app/"
|
||||
}
|
||||
14
Assets/UXImporterUnityUiToolKit/package.json.meta
Normal file
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 38dddf94641f3ca4bab21ebe510b4be7
|
||||
PackageManifestImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 337438
|
||||
packageName: UX Importer for UI Toolkit
|
||||
packageVersion: 0.1.6
|
||||
assetPath: Assets/UXImporterUnityUiToolKit/package.json
|
||||
uploadId: 840350
|
||||
8
Packages/app.rive.rive-unity/Demo.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 34c8d14f407404c2780aed613bcf201b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Packages/app.rive.rive-unity/Demo/RiveFiles.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f0a21ae66d8a641dcb38c6131b9158a4
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0232d39243ce848a8bc545f81d0bef78
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 043c4b240e8f94f828b8b81fa436f7f0, type: 3}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 350858
|
||||
packageName: Rive
|
||||
packageVersion: 0.4.2
|
||||
assetPath: Packages/app.rive.rive-unity/Demo/RiveFiles/quick_start_health_bar.riv
|
||||
uploadId: 896810
|
||||
8
Packages/app.rive.rive-unity/Editor.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 90a80d7fd4f5a41eda0b319cbf0dd947
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
632
Packages/app.rive.rive-unity/Editor/AssetEditor.cs
Normal file
@@ -0,0 +1,632 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
using UnityEditor;
|
||||
using UnityEngine.UIElements;
|
||||
using UnityEditor.UIElements;
|
||||
using System.Linq;
|
||||
using Rive.EditorTools;
|
||||
using System;
|
||||
|
||||
namespace Rive
|
||||
{
|
||||
[CustomEditor(typeof(Asset))]
|
||||
public class AssetEditor : Editor
|
||||
{
|
||||
File m_file;
|
||||
private Artboard m_artboard;
|
||||
private StateMachine m_stateMachine;
|
||||
private double m_lastTime = 0.0;
|
||||
public override bool HasPreviewGUI() => true;
|
||||
|
||||
public override bool RequiresConstantRepaint()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
private enum AssetReferenceType
|
||||
{
|
||||
Embedded = 0,
|
||||
Referenced = 1
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override VisualElement CreateInspectorGUI()
|
||||
{
|
||||
var root = new VisualElement();
|
||||
var riveAsset = (Asset)target;
|
||||
|
||||
// File Assets Section
|
||||
var embeddedFoldout = new Foldout { text = "File Assets", value = false };
|
||||
root.Add(embeddedFoldout);
|
||||
|
||||
foreach (var embeddedAsset in riveAsset.EmbeddedAssets)
|
||||
{
|
||||
var assetContainer = new VisualElement();
|
||||
assetContainer.style.paddingBottom = 30;
|
||||
|
||||
embeddedFoldout.Add(assetContainer);
|
||||
|
||||
// Asset Type
|
||||
var enumField = new EnumField("Type:", embeddedAsset.AssetType);
|
||||
enumField.SetEnabled(false);
|
||||
assetContainer.Add(enumField);
|
||||
|
||||
// Asset Name
|
||||
var nameField = new TextField("Name:") { value = embeddedAsset.Name };
|
||||
// For text fields, make them readonly instead of using SetEnabled(false) to allow for copying the text
|
||||
StyleAsReadonly(nameField);
|
||||
nameField.isReadOnly = true;
|
||||
assetContainer.Add(nameField);
|
||||
|
||||
// Asset ID
|
||||
var idField = new TextField("ID:") { value = embeddedAsset.Id.ToString() };
|
||||
StyleAsReadonly(idField);
|
||||
idField.isReadOnly = true;
|
||||
assetContainer.Add(idField);
|
||||
|
||||
// Asset Reference Type
|
||||
var referenceType = embeddedAsset.InBandBytesSize > 0 ? AssetReferenceType.Embedded : AssetReferenceType.Referenced;
|
||||
var referenceTypeField = new EnumField("Reference Type:", referenceType);
|
||||
referenceTypeField.SetEnabled(false);
|
||||
assetContainer.Add(referenceTypeField);
|
||||
|
||||
// Asset Data
|
||||
if (referenceType == AssetReferenceType.Embedded)
|
||||
{
|
||||
var embeddedField = new TextField("Embedded Size:")
|
||||
{
|
||||
value = FormatBytes(embeddedAsset.InBandBytesSize),
|
||||
tooltip = "The size of the asset data embedded in the Rive file."
|
||||
};
|
||||
StyleAsReadonly(embeddedField);
|
||||
embeddedField.isReadOnly = true;
|
||||
assetContainer.Add(embeddedField);
|
||||
}
|
||||
else
|
||||
{
|
||||
var assetField = new ObjectField("Referenced Asset")
|
||||
{
|
||||
objectType = GetAssetType(embeddedAsset.AssetType),
|
||||
value = embeddedAsset.OutOfBandAsset,
|
||||
};
|
||||
|
||||
// Allow referenced assets to be updated in the editor
|
||||
assetField.RegisterValueChangedCallback(evt =>
|
||||
{
|
||||
|
||||
var newValue = evt.newValue as OutOfBandAsset;
|
||||
|
||||
Asset asset = target as Asset;
|
||||
|
||||
if (asset == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Undo.RecordObject(this, "Updated Referenced Asset");
|
||||
|
||||
AssetImporter.SetOobAssetReference((Asset)target, embeddedAsset.Id, newValue);
|
||||
|
||||
});
|
||||
assetContainer.Add(assetField);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Artboard Metadata
|
||||
if (riveAsset.EditorOnlyMetadata != null && riveAsset.EditorOnlyMetadata.Artboards.Count > 0)
|
||||
{
|
||||
var contentsFoldout = new Foldout { text = "Artboard Metadata", value = false };
|
||||
root.Add(contentsFoldout);
|
||||
|
||||
for (int i = 0; i < riveAsset.EditorOnlyMetadata.Artboards.Count; i++)
|
||||
{
|
||||
bool isDefaultArtboard = i == 0;
|
||||
var artboard = riveAsset.EditorOnlyMetadata.Artboards[i];
|
||||
|
||||
// Create a foldout for each artboard
|
||||
string artboardLabel = artboard.Name + (isDefaultArtboard ? " (Default)" : "");
|
||||
var artboardFoldout = new Foldout { text = artboardLabel, value = false };
|
||||
artboardFoldout.style.paddingLeft = 8;
|
||||
artboardFoldout.style.paddingRight = 8;
|
||||
contentsFoldout.Add(artboardFoldout);
|
||||
|
||||
var artboardContainer = new VisualElement();
|
||||
artboardFoldout.Add(artboardContainer);
|
||||
|
||||
|
||||
AddCopyToClipboardMenu(artboardFoldout, artboard.Name, "Copy Artboard Name");
|
||||
|
||||
|
||||
// Artboard Size
|
||||
var sizeContainer = new VisualElement();
|
||||
sizeContainer.style.flexDirection = FlexDirection.Row;
|
||||
sizeContainer.style.marginLeft = 15;
|
||||
sizeContainer.style.marginTop = 5;
|
||||
artboardContainer.Add(sizeContainer);
|
||||
|
||||
var sizeLabel = new Label("Size:");
|
||||
sizeLabel.style.marginRight = 8;
|
||||
sizeContainer.Add(sizeLabel);
|
||||
|
||||
var sizeValueLabel = new Label($"{artboard.Width} x {artboard.Height}");
|
||||
sizeContainer.Add(sizeValueLabel);
|
||||
|
||||
|
||||
|
||||
// State Machines Container
|
||||
var stateMachinesContainer = new VisualElement();
|
||||
stateMachinesContainer.style.marginLeft = 15;
|
||||
stateMachinesContainer.style.marginTop = 10;
|
||||
artboardContainer.Add(stateMachinesContainer);
|
||||
|
||||
foreach (var stateMachine in artboard.StateMachines)
|
||||
{
|
||||
var smContainer = new VisualElement();
|
||||
smContainer.style.marginBottom = 10;
|
||||
|
||||
// State Machine Header
|
||||
var smHeader = new VisualElement();
|
||||
smHeader.style.flexDirection = FlexDirection.Row;
|
||||
smHeader.style.alignItems = Align.Center;
|
||||
smContainer.Add(smHeader);
|
||||
|
||||
var smLabel = new Label("State Machine:");
|
||||
smLabel.style.marginRight = 8;
|
||||
smHeader.Add(smLabel);
|
||||
|
||||
var smNameField = new TextField();
|
||||
smNameField.value = stateMachine.Name;
|
||||
StyleAsReadonly(smNameField);
|
||||
smNameField.isReadOnly = true;
|
||||
smNameField.SetEnabled(true);
|
||||
smNameField.style.flexGrow = 1;
|
||||
smHeader.Add(smNameField);
|
||||
|
||||
// Inputs
|
||||
if (stateMachine.Inputs.Count > 0)
|
||||
{
|
||||
var inputsContainer = new VisualElement();
|
||||
inputsContainer.style.marginLeft = 15;
|
||||
inputsContainer.style.marginTop = 5;
|
||||
smContainer.Add(inputsContainer);
|
||||
|
||||
var inputsLabel = new Label("Inputs:");
|
||||
inputsLabel.style.unityFontStyleAndWeight = FontStyle.Bold;
|
||||
inputsLabel.style.marginBottom = 5;
|
||||
inputsContainer.Add(inputsLabel);
|
||||
|
||||
foreach (var input in stateMachine.Inputs)
|
||||
{
|
||||
var inputContainer = new VisualElement();
|
||||
inputContainer.style.flexDirection = FlexDirection.Row;
|
||||
inputContainer.style.alignItems = Align.Center;
|
||||
inputContainer.style.marginBottom = 2;
|
||||
|
||||
var typeLabel = new Label(input.Type);
|
||||
typeLabel.style.marginRight = 8;
|
||||
typeLabel.style.width = 60;
|
||||
|
||||
var nameField = new TextField();
|
||||
nameField.value = input.Name;
|
||||
StyleAsReadonly(nameField);
|
||||
nameField.isReadOnly = true;
|
||||
nameField.SetEnabled(true);
|
||||
nameField.style.flexGrow = 1;
|
||||
|
||||
inputContainer.Add(typeLabel);
|
||||
inputContainer.Add(nameField);
|
||||
inputsContainer.Add(inputContainer);
|
||||
}
|
||||
}
|
||||
|
||||
stateMachinesContainer.Add(smContainer);
|
||||
}
|
||||
|
||||
if (artboard.DefaultViewModel != null && !String.IsNullOrEmpty(artboard.DefaultViewModel.Name))
|
||||
{
|
||||
var defaultVMContainer = new VisualElement();
|
||||
defaultVMContainer.style.flexDirection = FlexDirection.Row;
|
||||
defaultVMContainer.style.alignItems = Align.Center;
|
||||
|
||||
defaultVMContainer.style.marginLeft = 15;
|
||||
defaultVMContainer.style.marginBottom = 5;
|
||||
artboardContainer.Add(defaultVMContainer);
|
||||
|
||||
var defaultVMLabel = new Label("Default View Model:");
|
||||
defaultVMLabel.style.marginRight = 8;
|
||||
defaultVMContainer.Add(defaultVMLabel);
|
||||
|
||||
var defaultVMNameField = new TextField();
|
||||
defaultVMNameField.value = artboard.DefaultViewModel.Name;
|
||||
StyleAsReadonly(defaultVMNameField);
|
||||
defaultVMNameField.isReadOnly = true;
|
||||
defaultVMNameField.SetEnabled(true);
|
||||
defaultVMNameField.style.flexGrow = 1;
|
||||
defaultVMContainer.Add(defaultVMNameField);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// View Models Section
|
||||
|
||||
if (riveAsset.EditorOnlyMetadata != null && riveAsset.EditorOnlyMetadata.ViewModels.Count > 0)
|
||||
{
|
||||
var viewModelsFoldout = new Foldout { text = "View Models", value = false };
|
||||
|
||||
root.Add(viewModelsFoldout);
|
||||
|
||||
foreach (var viewModel in riveAsset.EditorOnlyMetadata.ViewModels)
|
||||
{
|
||||
var viewModelFoldout = new Foldout { text = viewModel.Name, value = false };
|
||||
viewModelFoldout.style.paddingLeft = 8;
|
||||
viewModelFoldout.style.paddingRight = 8;
|
||||
viewModelsFoldout.Add(viewModelFoldout);
|
||||
AddCopyToClipboardMenu(viewModelFoldout, viewModel.Name, "Copy View Model Name");
|
||||
|
||||
// Properties
|
||||
if (viewModel.Properties.Count > 0)
|
||||
{
|
||||
var propertiesContainer = new VisualElement();
|
||||
propertiesContainer.style.marginLeft = 15;
|
||||
propertiesContainer.style.marginTop = 5;
|
||||
viewModelFoldout.Add(propertiesContainer);
|
||||
|
||||
var propertiesLabel = new Label("Properties:");
|
||||
propertiesLabel.style.unityFontStyleAndWeight = FontStyle.Bold;
|
||||
propertiesLabel.style.marginBottom = 5;
|
||||
propertiesContainer.Add(propertiesLabel);
|
||||
|
||||
foreach (var property in viewModel.Properties)
|
||||
{
|
||||
var propertyContainer = new VisualElement();
|
||||
propertyContainer.style.flexDirection = FlexDirection.Row;
|
||||
propertyContainer.style.alignItems = Align.Center;
|
||||
propertyContainer.style.marginBottom = 2;
|
||||
|
||||
var typeLabel = new Label(GetViewModelPropertyTypeLabel(property));
|
||||
typeLabel.style.marginRight = 8;
|
||||
typeLabel.style.minWidth = 60;
|
||||
|
||||
var nameField = new TextField();
|
||||
nameField.value = property.Name;
|
||||
StyleAsReadonly(nameField);
|
||||
nameField.isReadOnly = true;
|
||||
nameField.SetEnabled(true);
|
||||
nameField.style.flexGrow = 1;
|
||||
|
||||
propertyContainer.Add(typeLabel);
|
||||
propertyContainer.Add(nameField);
|
||||
propertiesContainer.Add(propertyContainer);
|
||||
}
|
||||
}
|
||||
|
||||
// Instance Names
|
||||
if (viewModel.InstanceNames.Count > 0)
|
||||
{
|
||||
var instancesContainer = new VisualElement();
|
||||
instancesContainer.style.marginLeft = 15;
|
||||
instancesContainer.style.marginTop = 10;
|
||||
instancesContainer.style.marginBottom = 10;
|
||||
viewModelFoldout.Add(instancesContainer);
|
||||
|
||||
var instancesLabel = new Label("Instances:");
|
||||
instancesLabel.style.unityFontStyleAndWeight = FontStyle.Bold;
|
||||
instancesLabel.style.marginBottom = 5;
|
||||
instancesContainer.Add(instancesLabel);
|
||||
|
||||
foreach (var instanceName in viewModel.InstanceNames)
|
||||
{
|
||||
var instanceField = new TextField();
|
||||
instanceField.value = instanceName;
|
||||
StyleAsReadonly(instanceField);
|
||||
instanceField.isReadOnly = true;
|
||||
instanceField.SetEnabled(true);
|
||||
instancesContainer.Add(instanceField);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Enums Section
|
||||
|
||||
if (riveAsset.EditorOnlyMetadata.Enums.Count > 0)
|
||||
{
|
||||
var enumsFoldout = new Foldout { text = "Enums", value = false };
|
||||
root.Add(enumsFoldout);
|
||||
|
||||
foreach (var enumData in riveAsset.EditorOnlyMetadata.Enums)
|
||||
{
|
||||
// Create a foldout for each enum type
|
||||
var enumFoldout = new Foldout { text = enumData.Name, value = false };
|
||||
enumFoldout.style.paddingLeft = 8;
|
||||
enumFoldout.style.paddingRight = 8;
|
||||
enumsFoldout.Add(enumFoldout);
|
||||
AddCopyToClipboardMenu(enumFoldout, enumData.Name, "Copy Enum Name");
|
||||
|
||||
// Values
|
||||
var valuesContainer = new VisualElement();
|
||||
valuesContainer.style.marginLeft = 15;
|
||||
valuesContainer.style.marginTop = 5;
|
||||
valuesContainer.style.marginBottom = 10;
|
||||
enumFoldout.Add(valuesContainer);
|
||||
|
||||
var valuesLabel = new Label("Values:");
|
||||
valuesLabel.style.unityFontStyleAndWeight = FontStyle.Bold;
|
||||
valuesLabel.style.marginBottom = 5;
|
||||
valuesContainer.Add(valuesLabel);
|
||||
|
||||
foreach (var value in enumData.Values)
|
||||
{
|
||||
var valueField = new TextField();
|
||||
valueField.value = value;
|
||||
StyleAsReadonly(valueField);
|
||||
valueField.isReadOnly = true;
|
||||
valueField.SetEnabled(true);
|
||||
valuesContainer.Add(valueField);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
|
||||
private void AddCopyToClipboardMenu(Foldout foldout, string textToCopy, string itemLabel = null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(textToCopy))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
itemLabel = itemLabel ?? $"Copy \"{foldout.text}\"";
|
||||
|
||||
foldout.AddManipulator(new ContextualMenuManipulator((ContextualMenuPopulateEvent evt) =>
|
||||
{
|
||||
evt.menu.AppendAction(itemLabel, (action) =>
|
||||
{
|
||||
GUIUtility.systemCopyBuffer = textToCopy;
|
||||
});
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private string GetViewModelPropertyTypeLabel(FileMetadata.ViewModelPropertyMetadata property)
|
||||
{
|
||||
// We want to display the type of the property, and if it's a ViewModel type, we also want to display the nested ViewModel name.
|
||||
if (property.Type == ViewModelDataType.ViewModel)
|
||||
{
|
||||
return $"{property.Type.ToString()} ({property.NestedViewModelName})";
|
||||
}
|
||||
else if (property.Type == ViewModelDataType.Enum && !string.IsNullOrEmpty(property.EnumTypeName))
|
||||
{
|
||||
return $"{property.Type.ToString()} ({property.EnumTypeName})";
|
||||
}
|
||||
|
||||
return $"{property.Type.ToString()}";
|
||||
}
|
||||
|
||||
private void StyleAsReadonly(VisualElement element)
|
||||
{
|
||||
element.style.opacity = 0.5f;
|
||||
}
|
||||
|
||||
private System.Type GetAssetType(EmbeddedAssetType assetType)
|
||||
{
|
||||
switch (assetType)
|
||||
{
|
||||
case EmbeddedAssetType.Font:
|
||||
return typeof(FontOutOfBandAsset);
|
||||
case EmbeddedAssetType.Image:
|
||||
return typeof(ImageOutOfBandAsset);
|
||||
case EmbeddedAssetType.Audio:
|
||||
return typeof(AudioOutOfBandAsset);
|
||||
default:
|
||||
return typeof(System.Object);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override Texture2D RenderStaticPreview(
|
||||
string assetPath,
|
||||
UnityEngine.Object[] subAssets,
|
||||
int width,
|
||||
int height
|
||||
)
|
||||
{
|
||||
RenderTexture prev = RenderTexture.active;
|
||||
var rect = new Rect(0, 0, width, height);
|
||||
RenderTexture rt = Render(rect, true);
|
||||
|
||||
if (rt != null)
|
||||
{
|
||||
RenderTexture sourceForRead = rt;
|
||||
RenderTexture temp = null;
|
||||
|
||||
// Static preview: use the runtime decode material (Rive/UI/Default) in Linear color space.
|
||||
// This decodes gamma to linear, which works correctly with ReadPixels→Texture2D path.
|
||||
// We DON'T use the pass-through shader here because the blit+ReadPixels seems to cause issues, and leads to nothing rendering for the static preview.
|
||||
// TODO: Remove this once we have a proper way to display the texture in Linear color space.
|
||||
if (Rive.TextureHelper.ProjectNeedsColorSpaceFix)
|
||||
{
|
||||
var mat = Rive.TextureHelper.GammaToLinearUIMaterial;
|
||||
if (mat != null)
|
||||
{
|
||||
temp = RenderTexture.GetTemporary(rt.width, rt.height, 0, RenderTextureFormat.ARGB32);
|
||||
Graphics.Blit(rt, temp, mat);
|
||||
sourceForRead = temp;
|
||||
}
|
||||
}
|
||||
|
||||
RenderTexture.active = sourceForRead;
|
||||
|
||||
Texture2D tex = new Texture2D(width, height);
|
||||
tex.ReadPixels(rect, 0, 0);
|
||||
tex.Apply(true);
|
||||
|
||||
RenderTexture.active = prev;
|
||||
if (temp != null)
|
||||
{
|
||||
RenderTexture.ReleaseTemporary(temp);
|
||||
}
|
||||
RenderTexture.ReleaseTemporary(rt);
|
||||
return tex;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
RenderTexture Render(Rect rect, bool isStatic = false)
|
||||
{
|
||||
int width = (int)rect.width;
|
||||
int height = (int)rect.height;
|
||||
|
||||
var descriptor = Rive.TextureHelper.Descriptor(width, height);
|
||||
RenderTexture rt = RenderTexture.GetTemporary(descriptor);
|
||||
|
||||
var cmb = new CommandBuffer();
|
||||
|
||||
cmb.SetRenderTarget(rt);
|
||||
|
||||
if (m_file == null)
|
||||
{
|
||||
var riveAsset = (Rive.Asset)target;
|
||||
m_file = Rive.File.Load(riveAsset);
|
||||
m_artboard = m_file?.Artboard(0);
|
||||
m_stateMachine = m_artboard?.StateMachine();
|
||||
}
|
||||
|
||||
if (m_artboard != null)
|
||||
{
|
||||
var rq = new RenderQueue(
|
||||
UnityEngine.SystemInfo.graphicsDeviceType == GraphicsDeviceType.Metal
|
||||
? null
|
||||
: rt
|
||||
);
|
||||
var renderer = rq.Renderer();
|
||||
renderer.Align(Fit.Contain, Alignment.Center, m_artboard);
|
||||
renderer.Draw(m_artboard);
|
||||
renderer.AddToCommandBuffer(cmb);
|
||||
if (!isStatic)
|
||||
{
|
||||
var now = EditorApplication.timeSinceStartup;
|
||||
double time = now - m_lastTime;
|
||||
m_stateMachine?.Advance((float)(now - m_lastTime));
|
||||
m_lastTime = now;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_stateMachine?.Advance(0.0f);
|
||||
}
|
||||
}
|
||||
var prev = RenderTexture.active;
|
||||
Graphics.ExecuteCommandBuffer(cmb);
|
||||
GL.InvalidateState();
|
||||
cmb.Clear();
|
||||
|
||||
if (isStatic && FlipY())
|
||||
{
|
||||
RenderTexture temp = RenderTexture.GetTemporary(
|
||||
width,
|
||||
height,
|
||||
0,
|
||||
RenderTextureFormat.Default,
|
||||
RenderTextureReadWrite.Default
|
||||
);
|
||||
temp.Create();
|
||||
|
||||
Graphics.Blit(rt, temp, new Vector2(1, -1), new Vector2(0, 1));
|
||||
RenderTexture.ReleaseTemporary(rt);
|
||||
rt = temp;
|
||||
}
|
||||
|
||||
// Caller releases the temporary RT
|
||||
return rt;
|
||||
}
|
||||
|
||||
public override void OnPreviewGUI(Rect rect, GUIStyle background)
|
||||
{
|
||||
if (Event.current.type == EventType.Repaint)
|
||||
{
|
||||
RenderTexture rt = Render(rect);
|
||||
|
||||
var drawRect = FlipY()
|
||||
? new Rect(rect.x, rect.y + rect.height, rect.width, -rect.height)
|
||||
: rect;
|
||||
|
||||
// Live preview: use a simple pass-through shader in Linear color space.
|
||||
// Rive outputs gamma values, and it looks like EditorGUI.DrawPreviewTexture expects sRGB input.
|
||||
// We DON'T use the decode material here because it would decode to linear, causing burnt/dark colors.
|
||||
// The pass-through shader (Hidden/Rive/Editor/SRGBEncodePreview) just returns the texture unchanged.
|
||||
// TODO: Remove this once we have a proper way to display the texture in Linear color space.
|
||||
var mat = (Rive.TextureHelper.ProjectNeedsColorSpaceFix ? GetEncodePreviewMaterial() : null);
|
||||
UnityEditor.EditorGUI.DrawPreviewTexture(drawRect, rt, mat);
|
||||
RenderTexture.ReleaseTemporary(rt);
|
||||
}
|
||||
}
|
||||
|
||||
private static Material s_encodePreviewMaterial;
|
||||
private static Material GetEncodePreviewMaterial()
|
||||
{
|
||||
if (s_encodePreviewMaterial != null) return s_encodePreviewMaterial;
|
||||
var shader = Shader.Find("Hidden/Rive/Editor/SRGBEncodePreview");
|
||||
if (shader == null) return null;
|
||||
s_encodePreviewMaterial = new Material(shader)
|
||||
{
|
||||
name = "Rive_Editor_SRGBEncodePreview",
|
||||
hideFlags = HideFlags.HideAndDontSave
|
||||
};
|
||||
return s_encodePreviewMaterial;
|
||||
}
|
||||
|
||||
private void UnloadPreview()
|
||||
{
|
||||
m_stateMachine = null;
|
||||
m_artboard = null;
|
||||
if (m_file != null)
|
||||
{
|
||||
m_file.Dispose();
|
||||
m_file = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void OnDisable()
|
||||
{
|
||||
var riveAsset = (Rive.Asset)target;
|
||||
UnloadPreview();
|
||||
}
|
||||
|
||||
private static bool FlipY()
|
||||
{
|
||||
switch (UnityEngine.SystemInfo.graphicsDeviceType)
|
||||
{
|
||||
case GraphicsDeviceType.Metal:
|
||||
case GraphicsDeviceType.Vulkan:
|
||||
case GraphicsDeviceType.Direct3D11:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static string FormatBytes(uint byteCount)
|
||||
{
|
||||
string[] sizes = { "B", "KB", "MB", "GB", "TB" };
|
||||
int order = 0;
|
||||
while (byteCount >= 1024 && order < sizes.Length - 1)
|
||||
{
|
||||
order++;
|
||||
byteCount /= 1024;
|
||||
}
|
||||
|
||||
// Adjust the format string to your preferences. For example "{0:0.#}{1}" would
|
||||
// show a single decimal place, and no space.
|
||||
return string.Format("{0:0.##} {1}", byteCount, sizes[order]);
|
||||
}
|
||||
}
|
||||
}
|
||||
18
Packages/app.rive.rive-unity/Editor/AssetEditor.cs.meta
Normal file
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c0c0086d5bb044ad3ad1fd3d80d1a5e4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 350858
|
||||
packageName: Rive
|
||||
packageVersion: 0.4.2
|
||||
assetPath: Packages/app.rive.rive-unity/Editor/AssetEditor.cs
|
||||
uploadId: 896810
|
||||
308
Packages/app.rive.rive-unity/Editor/AssetImporter.cs
Normal file
@@ -0,0 +1,308 @@
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor.AssetImporters;
|
||||
using UnityEditor;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Rive.Utils;
|
||||
|
||||
namespace Rive
|
||||
{
|
||||
[ScriptedImporter(version: 2, ext: "riv")]
|
||||
public class AssetImporter : ScriptedImporter
|
||||
{
|
||||
|
||||
[System.Serializable]
|
||||
private class OobReferenceData
|
||||
{
|
||||
/// <summary>
|
||||
/// ID of the referenced asset in Rive
|
||||
/// </summary>
|
||||
public uint assetIdInRiv;
|
||||
|
||||
/// <summary>
|
||||
/// GUID of the referenced asset in Unity
|
||||
/// </summary>
|
||||
public string assetGuid;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
private class UserDataContainer
|
||||
{
|
||||
/// <summary>
|
||||
/// List of stored OOB references to override OutOfBandAsset references on the generated Asset
|
||||
/// </summary>
|
||||
public List<OobReferenceData> oobReferences = new List<OobReferenceData>();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Remove a stored OOB reference from the list
|
||||
/// </summary>
|
||||
/// <param name="assetId"> ID of the referenced asset in Rive </param>
|
||||
public void RemoveOobReference(uint assetId)
|
||||
{
|
||||
oobReferences.RemoveAll(r => r.assetIdInRiv == assetId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add a new OOB reference to the list
|
||||
/// </summary>
|
||||
/// <param name="assetId"> ID of the referenced asset in Rive </param>
|
||||
/// <param name="assetGuid"> GUID of the referenced asset in Unity </param>
|
||||
public void AddOobReference(uint assetId, string assetGuid)
|
||||
{
|
||||
|
||||
// Remove any existing reference with the same ID
|
||||
RemoveOobReference(assetId);
|
||||
|
||||
oobReferences.Add(new OobReferenceData
|
||||
{
|
||||
assetIdInRiv = assetId,
|
||||
assetGuid = assetGuid
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
delegate void Callback();
|
||||
|
||||
void AfterUpdate(Callback call)
|
||||
{
|
||||
void callback()
|
||||
{
|
||||
if (!EditorApplication.isCompiling && !EditorApplication.isUpdating)
|
||||
{
|
||||
call();
|
||||
EditorApplication.update -= callback;
|
||||
}
|
||||
}
|
||||
|
||||
EditorApplication.update += callback;
|
||||
}
|
||||
|
||||
public static string[] fontExtensions = FontOobAssetExtensions.FontExtensions;
|
||||
public static string[] imageExtensions = ImageOobAssetExtensions.ImageExtensions;
|
||||
public static string[] audioExtensions = AudioOobAssetExtensions.AudioExtensions;
|
||||
|
||||
private EmbeddedAssetDataLoader embeddedAssetDataLoader = new EmbeddedAssetDataLoader();
|
||||
|
||||
|
||||
|
||||
public override void OnImportAsset(AssetImportContext ctx)
|
||||
{
|
||||
bool isFirstImport = importSettingsMissing;
|
||||
var assetPath = ctx.assetPath;
|
||||
byte[] bytes = System.IO.File.ReadAllBytes(assetPath);
|
||||
|
||||
// Deserialize stored references from userData
|
||||
// The Asset class is recreated on every import, so changes made to the Asset class will be lost on reimport. To get around this, we store reference information about oob asset overrides in the importer userData to keep them between imports.
|
||||
// This lets us keep track of the custom assets provided by the user. The userData is stored in the meta file.
|
||||
var userDataContainer = string.IsNullOrEmpty(userData)
|
||||
? new UserDataContainer()
|
||||
: JsonUtility.FromJson<UserDataContainer>(userData);
|
||||
|
||||
int oobAssetCount = 0;
|
||||
|
||||
List<EmbeddedAssetData> assets = new List<EmbeddedAssetData>();
|
||||
|
||||
foreach (var embeddedAsset in embeddedAssetDataLoader.LoadEmbeddedAssetDataFromRiveFileBytes(bytes))
|
||||
{
|
||||
// Check if we have a stored reference
|
||||
var storedReference = userDataContainer.oobReferences
|
||||
.FirstOrDefault(r => r.assetIdInRiv == embeddedAsset.Id);
|
||||
|
||||
// If the asset at the index is not a referenced asset, then we clear the stored reference as we only want to store references to oob assets set to `Referenced`
|
||||
if (embeddedAsset.InBandBytesSize > 0)
|
||||
{
|
||||
userDataContainer.RemoveOobReference(embeddedAsset.Id);
|
||||
|
||||
storedReference = null;
|
||||
}
|
||||
|
||||
if (storedReference != null)
|
||||
{
|
||||
var oobAssetPath = AssetDatabase.GUIDToAssetPath(storedReference.assetGuid);
|
||||
if (!string.IsNullOrEmpty(assetPath))
|
||||
{
|
||||
var referencedAsset = AssetDatabase.LoadAssetAtPath<OutOfBandAsset>(oobAssetPath);
|
||||
if (referencedAsset != null)
|
||||
{
|
||||
embeddedAsset.OutOfBandAsset = referencedAsset;
|
||||
ctx.DependsOnArtifact(oobAssetPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var basePath = System.IO.Path.GetDirectoryName(assetPath);
|
||||
|
||||
switch (embeddedAsset.AssetType)
|
||||
{
|
||||
case EmbeddedAssetType.Font:
|
||||
HandleAsset(embeddedAsset, basePath, fontExtensions, typeof(FontOutOfBandAsset), ctx, ref oobAssetCount);
|
||||
break;
|
||||
case EmbeddedAssetType.Image:
|
||||
HandleAsset(embeddedAsset, basePath, imageExtensions, typeof(ImageOutOfBandAsset), ctx, ref oobAssetCount);
|
||||
break;
|
||||
case EmbeddedAssetType.Audio:
|
||||
HandleAsset(embeddedAsset, basePath, audioExtensions, typeof(AudioOutOfBandAsset), ctx, ref oobAssetCount);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
assets.Add(embeddedAsset);
|
||||
}
|
||||
|
||||
var file = Asset.Create(bytes, assets.ToArray());
|
||||
|
||||
ctx.AddObjectToAsset("rive", file);
|
||||
|
||||
if (oobAssetCount != 0 && isFirstImport)
|
||||
{
|
||||
// The file seems to have out of band assets, try to resolve
|
||||
// them. We only do this on first import so the user can go
|
||||
// manually change auto-detected OOB assets to use a different
|
||||
// importer if they want.
|
||||
AfterUpdate(() =>
|
||||
{
|
||||
ImportOutOfBandAssets(assetPath);
|
||||
});
|
||||
}
|
||||
ctx.SetMainObject(file);
|
||||
|
||||
}
|
||||
|
||||
internal static void SetOobAssetReference(Asset targetRiveAsset, uint assetId, OutOfBandAsset oobAsset)
|
||||
{
|
||||
var importer = AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(targetRiveAsset)) as AssetImporter;
|
||||
|
||||
if (importer == null)
|
||||
{
|
||||
DebugLogger.Instance.LogError("Could not get AssetImporter for target Rive asset");
|
||||
return;
|
||||
}
|
||||
|
||||
string userDataToApply = importer.userData;
|
||||
|
||||
|
||||
var container = string.IsNullOrEmpty(userDataToApply)
|
||||
? new UserDataContainer()
|
||||
: JsonUtility.FromJson<UserDataContainer>(userDataToApply);
|
||||
|
||||
container.RemoveOobReference(assetId);
|
||||
|
||||
// If the asset is null, we still want to store the reference as the user might have set it to null on purpose.
|
||||
// If we don't store it, the importer will try to auto-detect a matching asset in the directory on the next import.
|
||||
var path = oobAsset != null ? AssetDatabase.GetAssetPath(oobAsset) : null;
|
||||
var guid = path != null ? AssetDatabase.AssetPathToGUID(path) : null;
|
||||
|
||||
container.AddOobReference(assetId, guid);
|
||||
|
||||
// Clear out any items in the list that are no longer valid (e.g assetIdInRiv is no longer in the file)
|
||||
container.oobReferences.RemoveAll(r => targetRiveAsset.EmbeddedAssets.All(e => e.Id != r.assetIdInRiv));
|
||||
|
||||
userDataToApply = JsonUtility.ToJson(container);
|
||||
|
||||
importer.userData = userDataToApply;
|
||||
|
||||
importer.SaveAndReimport();
|
||||
}
|
||||
|
||||
|
||||
private void HandleAsset(EmbeddedAssetData embeddedAsset, string basePath, string[] extensions, Type assetType, AssetImportContext ctx, ref int oobAssetCount)
|
||||
{
|
||||
// If this is a reimport and the asset already has a valid OutOfBandAsset, keep it
|
||||
if (embeddedAsset.OutOfBandAsset != null)
|
||||
{
|
||||
ctx.DependsOnArtifact(AssetDatabase.GetAssetPath(embeddedAsset.OutOfBandAsset));
|
||||
oobAssetCount++;
|
||||
return;
|
||||
}
|
||||
|
||||
// Only try to auto-detect assets if there isn't one already assigned
|
||||
foreach (var path in AssetPaths(basePath, embeddedAsset.Name, embeddedAsset.Id, extensions))
|
||||
{
|
||||
if (System.IO.File.Exists(path))
|
||||
{
|
||||
oobAssetCount++;
|
||||
ctx.DependsOnArtifact(path);
|
||||
if (!String.IsNullOrEmpty(AssetDatabase.AssetPathToGUID(path)))
|
||||
{
|
||||
var referencedAsset = AssetDatabase.LoadAssetAtPath(path, assetType);
|
||||
if (referencedAsset != null)
|
||||
{
|
||||
embeddedAsset.OutOfBandAsset = referencedAsset as OutOfBandAsset;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Pre-import any out of band assets.
|
||||
|
||||
private void ImportOutOfBandAssets(string assetPath)
|
||||
{
|
||||
var bytes = System.IO.File.ReadAllBytes(assetPath);
|
||||
var basePath = System.IO.Path.GetDirectoryName(assetPath);
|
||||
|
||||
|
||||
foreach (var embeddedAsset in embeddedAssetDataLoader.LoadEmbeddedAssetDataFromRiveFileBytes(bytes))
|
||||
{
|
||||
|
||||
switch (embeddedAsset.AssetType)
|
||||
{
|
||||
case EmbeddedAssetType.Font:
|
||||
ImportAssetGeneric<FontAssetImporter>(embeddedAsset, basePath, fontExtensions);
|
||||
break;
|
||||
case EmbeddedAssetType.Image:
|
||||
ImportAssetGeneric<ImageAssetImporter>(embeddedAsset, basePath, imageExtensions);
|
||||
break;
|
||||
case EmbeddedAssetType.Audio:
|
||||
ImportAssetGeneric<AudioAssetImporter>(embeddedAsset, basePath, audioExtensions);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void ImportAssetGeneric<T>(EmbeddedAssetData embeddedAsset, string basePath, string[] extensions) where T : ScriptedImporter
|
||||
{
|
||||
foreach (var path in AssetPaths(basePath, embeddedAsset.Name, embeddedAsset.Id, extensions))
|
||||
{
|
||||
if (System.IO.File.Exists(path) && AssetDatabase.GetImporterOverride(path) == null)
|
||||
{
|
||||
AssetDatabase.SetImporterOverride<T>(path);
|
||||
AssetDatabase.ImportAsset(path);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string[] AssetPaths(string basePath, string name, uint id, string[] extensions)
|
||||
{
|
||||
List<string> paths = new List<string>();
|
||||
foreach (var extension in extensions)
|
||||
{
|
||||
paths.Add(
|
||||
basePath
|
||||
+ System.IO.Path.DirectorySeparatorChar
|
||||
+ System.IO.Path.GetFileNameWithoutExtension(name)
|
||||
+ "-"
|
||||
+ id
|
||||
+ "."
|
||||
+ extension
|
||||
);
|
||||
paths.Add(
|
||||
basePath
|
||||
+ System.IO.Path.DirectorySeparatorChar
|
||||
+ System.IO.Path.GetFileNameWithoutExtension(name)
|
||||
+ "."
|
||||
+ extension
|
||||
);
|
||||
}
|
||||
return paths.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
18
Packages/app.rive.rive-unity/Editor/AssetImporter.cs.meta
Normal file
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 043c4b240e8f94f828b8b81fa436f7f0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {fileID: 2800000, guid: df0df084c4eaa4149a9c988c71b85313, type: 3}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 350858
|
||||
packageName: Rive
|
||||
packageVersion: 0.4.2
|
||||
assetPath: Packages/app.rive.rive-unity/Editor/AssetImporter.cs
|
||||
uploadId: 896810
|
||||
28
Packages/app.rive.rive-unity/Editor/AudioAssetImporter.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor.AssetImporters;
|
||||
|
||||
namespace Rive
|
||||
{
|
||||
|
||||
internal static class AudioOobAssetExtensions
|
||||
{
|
||||
public const string WAV = "wav";
|
||||
public const string MP3 = "mp3";
|
||||
public const string FLAC = "flac";
|
||||
|
||||
public static readonly string[] AudioExtensions = new[] { WAV, MP3, FLAC };
|
||||
}
|
||||
|
||||
[ScriptedImporter(1, null, new string[] { AudioOobAssetExtensions.WAV, AudioOobAssetExtensions.MP3, AudioOobAssetExtensions.FLAC })]
|
||||
public class AudioAssetImporter : ScriptedImporter
|
||||
{
|
||||
public override void OnImportAsset(AssetImportContext ctx)
|
||||
{
|
||||
byte[] bytesToAssign = System.IO.File.ReadAllBytes(ctx.assetPath);
|
||||
AudioOutOfBandAsset file = OutOfBandAsset.Create<AudioOutOfBandAsset>(bytesToAssign);
|
||||
|
||||
ctx.AddObjectToAsset("rive-audio", file);
|
||||
ctx.SetMainObject(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 20badb765cb0b4f4dadbcd748172bc88
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 350858
|
||||
packageName: Rive
|
||||
packageVersion: 0.4.2
|
||||
assetPath: Packages/app.rive.rive-unity/Editor/AudioAssetImporter.cs
|
||||
uploadId: 896810
|
||||
8
Packages/app.rive.rive-unity/Editor/Components.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f4f0a0d3cb1c74b528f162c21da5d57b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,10 @@
|
||||
using Rive.Components;
|
||||
using UnityEditor;
|
||||
|
||||
namespace Rive.EditorTools
|
||||
{
|
||||
[CustomEditor(typeof(AtlasRenderTargetStrategy), true)]
|
||||
internal class AtlasRenderTextureStrategyInspector : RiveBaseEditor
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b0622d49537654134954a8e5d3817d74
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences:
|
||||
- m_styleSheet: {fileID: 7433441132597879392, guid: cc66ac87f8ecb4e3c91384370163ee7b,
|
||||
type: 3}
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 350858
|
||||
packageName: Rive
|
||||
packageVersion: 0.4.2
|
||||
assetPath: Packages/app.rive.rive-unity/Editor/Components/AtlasRenderTextureStrategyInspector.cs
|
||||
uploadId: 896810
|
||||
@@ -0,0 +1,25 @@
|
||||
using Rive.Components;
|
||||
using UnityEditor;
|
||||
|
||||
namespace Rive.EditorTools
|
||||
{
|
||||
[CustomEditor(typeof(RiveCanvasRenderer), true)]
|
||||
internal class CanvasPanelRendererEditor : PanelRendererInspector
|
||||
{
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
|
||||
if (PanelRenderer.RivePanel == null)
|
||||
{
|
||||
RivePanel existingPanel = PanelRenderer.GetComponent<RivePanel>();
|
||||
|
||||
if (existingPanel != null)
|
||||
{
|
||||
PanelRenderer.RivePanel = existingPanel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6cf302e24face493783124060035fb4c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences:
|
||||
- m_styleSheet: {fileID: 7433441132597879392, guid: cc66ac87f8ecb4e3c91384370163ee7b,
|
||||
type: 3}
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 350858
|
||||
packageName: Rive
|
||||
packageVersion: 0.4.2
|
||||
assetPath: Packages/app.rive.rive-unity/Editor/Components/CanvasPanelRendererEditor.cs
|
||||
uploadId: 896810
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 43b94ffc302e04258ab481523df9abaa
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
#if !UNITY_2022_1_OR_NEWER
|
||||
using UnityEditor.UIElements; // Required for Unity 2021
|
||||
#endif
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace Rive.EditorTools
|
||||
{
|
||||
/// <summary>
|
||||
/// We don't directly use the property drawer for the Alignment class, but we keep it as a way to create the dropdown field in the inspector for RiveBaseEditor.
|
||||
/// We do this because the RiveBaseEditor class supports a bunch of the custom attributes we've created and having multiple drawers for the same class can cause conflicts so we do it all in the RiveBaseEditor class.
|
||||
/// </summary>
|
||||
//[CustomPropertyDrawer(typeof(Alignment))]
|
||||
internal class AlignmentPropertyDrawer : PropertyDrawer
|
||||
{
|
||||
private static readonly (string display, Alignment value)[] OPTIONS = new[]
|
||||
{
|
||||
("Top Left", Alignment.TopLeft),
|
||||
("Top Center", Alignment.TopCenter),
|
||||
("Top Right", Alignment.TopRight),
|
||||
("Center Left", Alignment.CenterLeft),
|
||||
("Center", Alignment.Center),
|
||||
("Center Right", Alignment.CenterRight),
|
||||
("Bottom Left", Alignment.BottomLeft),
|
||||
("Bottom Center", Alignment.BottomCenter),
|
||||
("Bottom Right", Alignment.BottomRight)
|
||||
};
|
||||
|
||||
|
||||
|
||||
public override VisualElement CreatePropertyGUI(SerializedProperty property)
|
||||
{
|
||||
var container = new VisualElement();
|
||||
|
||||
var xProp = property.FindPropertyRelative(Alignment.BindingPath_Xfield);
|
||||
var yProp = property.FindPropertyRelative(Alignment.BindingPath_Yfield);
|
||||
|
||||
// Default to Center if we can't get the values
|
||||
var centerIndex = Array.FindIndex(OPTIONS, o => o.value.Equals(Alignment.Center));
|
||||
var currentIndex = centerIndex;
|
||||
|
||||
if (xProp != null && yProp != null)
|
||||
{
|
||||
var currentAlignment = new Alignment(xProp.floatValue, yProp.floatValue);
|
||||
currentIndex = Array.FindIndex(OPTIONS, o => o.value.Equals(currentAlignment));
|
||||
if (currentIndex < 0) currentIndex = centerIndex;
|
||||
}
|
||||
|
||||
var choices = OPTIONS.Select(o => o.display).ToList();
|
||||
|
||||
var dropdown = new PopupField<string>(
|
||||
property.displayName,
|
||||
choices,
|
||||
currentIndex
|
||||
);
|
||||
|
||||
dropdown.RegisterValueChangedCallback(evt =>
|
||||
{
|
||||
var index = choices.IndexOf(evt.newValue);
|
||||
if (index >= 0 && xProp != null && yProp != null)
|
||||
{
|
||||
var selectedAlignment = OPTIONS[index].value;
|
||||
xProp.floatValue = selectedAlignment.X;
|
||||
yProp.floatValue = selectedAlignment.Y;
|
||||
property.serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
});
|
||||
|
||||
dropdown.AddToClassList(StyleHelper.CLASS_FIELD);
|
||||
|
||||
// This ensures that the dropdown is aligned with other fields in the inspector
|
||||
dropdown.AddToClassList(BaseField<UnityEditor.UIElements.PropertyField>.alignedFieldUssClassName);
|
||||
container.Add(dropdown);
|
||||
return container;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 114c8e3b6a625400a8497c76cf6af315
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 350858
|
||||
packageName: Rive
|
||||
packageVersion: 0.4.2
|
||||
assetPath: Packages/app.rive.rive-unity/Editor/Components/CustomElements/AlignmentPropertyDrawer.cs
|
||||
uploadId: 896810
|
||||
@@ -0,0 +1,144 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEditor.UIElements;
|
||||
using UnityEngine.UIElements;
|
||||
using Rive.Utils;
|
||||
|
||||
namespace Rive.EditorTools
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(DropdownAttribute))]
|
||||
internal class DropdownDrawer : PropertyDrawer
|
||||
{
|
||||
private PopupOrTextField dropdown;
|
||||
private SerializedProperty property;
|
||||
private object target;
|
||||
private DropdownAttribute dropdownAttr;
|
||||
private MemberInfo optionsMember;
|
||||
|
||||
public override VisualElement CreatePropertyGUI(SerializedProperty property)
|
||||
{
|
||||
this.property = property;
|
||||
dropdownAttr = attribute as DropdownAttribute;
|
||||
target = property.serializedObject.targetObject;
|
||||
var targetType = target.GetType();
|
||||
|
||||
// Try to find member (field, property, or method)
|
||||
optionsMember = targetType.GetField(dropdownAttr.OptionsMemberName,
|
||||
BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static);
|
||||
|
||||
if (optionsMember == null)
|
||||
{
|
||||
optionsMember = targetType.GetProperty(dropdownAttr.OptionsMemberName,
|
||||
BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static);
|
||||
}
|
||||
|
||||
if (optionsMember == null)
|
||||
{
|
||||
optionsMember = targetType.GetMethod(dropdownAttr.OptionsMemberName,
|
||||
BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static);
|
||||
}
|
||||
|
||||
if (optionsMember == null)
|
||||
{
|
||||
var errorContainer = new VisualElement();
|
||||
errorContainer.Add(new HelpBox($"Member {dropdownAttr.OptionsMemberName} not found", HelpBoxMessageType.Error));
|
||||
errorContainer.Add(new PropertyField(property));
|
||||
return errorContainer;
|
||||
}
|
||||
|
||||
dropdown = CreateDropdown();
|
||||
|
||||
// Only register for updates if TrackChanges is enabled
|
||||
if (dropdownAttr.TrackChanges)
|
||||
{
|
||||
EditorApplication.update += UpdateDropdownOptions;
|
||||
|
||||
dropdown.RegisterCallback<DetachFromPanelEvent>(evt =>
|
||||
{
|
||||
EditorApplication.update -= UpdateDropdownOptions;
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
// For non-tracked dropdowns, we still want to update when the panel is attached
|
||||
dropdown.RegisterCallback<AttachToPanelEvent>(evt =>
|
||||
{
|
||||
UpdateDropdownOptions();
|
||||
});
|
||||
}
|
||||
|
||||
return dropdown;
|
||||
}
|
||||
|
||||
private PopupOrTextField CreateDropdown()
|
||||
{
|
||||
var options = GetCurrentOptions();
|
||||
var currentValue = property.stringValue;
|
||||
|
||||
var label = ReflectionUtils.GetPropertyLabel(property);
|
||||
var dropdown = new PopupOrTextField(options, currentValue,
|
||||
label);
|
||||
|
||||
dropdown.BindProperty(property);
|
||||
|
||||
var inspectorFieldAttr = fieldInfo.GetCustomAttribute<InspectorFieldAttribute>();
|
||||
if (inspectorFieldAttr != null)
|
||||
{
|
||||
dropdown.AddToClassList(StyleHelper.CLASS_FIELD);
|
||||
}
|
||||
|
||||
return dropdown;
|
||||
}
|
||||
|
||||
private List<string> GetCurrentOptions()
|
||||
{
|
||||
object options = null;
|
||||
|
||||
switch (optionsMember)
|
||||
{
|
||||
case FieldInfo field:
|
||||
options = field.GetValue(target);
|
||||
break;
|
||||
case PropertyInfo prop:
|
||||
options = prop.GetValue(target);
|
||||
break;
|
||||
case MethodInfo method:
|
||||
options = method.Invoke(target, null);
|
||||
break;
|
||||
}
|
||||
|
||||
if (options is IEnumerable<string> enumerable)
|
||||
{
|
||||
return enumerable.ToList();
|
||||
}
|
||||
|
||||
return new List<string>();
|
||||
}
|
||||
|
||||
private void UpdateDropdownOptions()
|
||||
{
|
||||
if (dropdown?.panel == null) return;
|
||||
|
||||
var newOptions = GetCurrentOptions();
|
||||
if (!AreOptionsEqual(dropdown.Choices, newOptions))
|
||||
{
|
||||
dropdown.Choices = newOptions;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private bool AreOptionsEqual(List<string> a, List<string> b)
|
||||
{
|
||||
if (a.Count != b.Count) return false;
|
||||
for (int i = 0; i < a.Count; i++)
|
||||
{
|
||||
if (a[i] != b[i]) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 55ad3672c80b042f288de391c21e3bf9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 350858
|
||||
packageName: Rive
|
||||
packageVersion: 0.4.2
|
||||
assetPath: Packages/app.rive.rive-unity/Editor/Components/CustomElements/DropdownDrawer.cs
|
||||
uploadId: 896810
|
||||
@@ -0,0 +1,237 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
using UnityEditor.UIElements;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Rive.Utils;
|
||||
#if UNITY_6000_3_OR_NEWER
|
||||
using MaterialShaderPropertyType = UnityEngine.Rendering.ShaderPropertyType;
|
||||
#else
|
||||
using MaterialShaderPropertyType = UnityEditor.ShaderUtil.ShaderPropertyType;
|
||||
#endif
|
||||
|
||||
namespace Rive.EditorTools
|
||||
{
|
||||
/// <summary>
|
||||
/// Draws a list of properties from a material on a component as a dropdown. This is useful if you want to display a list of properties from a material on a component in the inspector.
|
||||
/// </summary>
|
||||
[CustomPropertyDrawer(typeof(MaterialPropertiesAttribute))]
|
||||
internal class MaterialPropertiesDrawer : PropertyDrawer
|
||||
{
|
||||
private VisualElement m_root;
|
||||
private List<string> m_availablePropertyNames = new List<string>();
|
||||
private SerializedObject m_serializedObject;
|
||||
|
||||
private Material[] GetMaterialsFromSource(object target, string sourceName)
|
||||
{
|
||||
// Try to get materials directly
|
||||
if (ReflectionUtils.TryGetValue<Material[]>(target, sourceName, out var materials))
|
||||
{
|
||||
return materials;
|
||||
}
|
||||
|
||||
// If we got a renderer instead, get its materials
|
||||
if (ReflectionUtils.TryGetValue<UnityEngine.Renderer>(target, sourceName, out var renderer))
|
||||
{
|
||||
return renderer?.sharedMaterials;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public override VisualElement CreatePropertyGUI(SerializedProperty property)
|
||||
{
|
||||
var attr = attribute as MaterialPropertiesAttribute;
|
||||
m_root = new VisualElement();
|
||||
m_serializedObject = property.serializedObject;
|
||||
|
||||
var target = property.serializedObject.targetObject;
|
||||
var materials = GetMaterialsFromSource(target, attr.MaterialsSourceName);
|
||||
|
||||
if (materials == null)
|
||||
{
|
||||
m_root.Add(new HelpBox($"Could not find materials source: {attr.MaterialsSourceName}", HelpBoxMessageType.Error));
|
||||
return m_root;
|
||||
}
|
||||
|
||||
UpdateUI(property, materials, attr.PropertyType);
|
||||
return m_root;
|
||||
}
|
||||
|
||||
private void UpdateUI(SerializedProperty property, Material[] materials, MaterialShaderPropertyType propertyType)
|
||||
{
|
||||
m_root.Clear();
|
||||
UpdateAvailablePropertyNames(materials, propertyType);
|
||||
|
||||
var keysProperty = property.FindPropertyRelative(SerializedDictionary<int, Components.RiveTextureRenderer.PropertyNameListHolder>.BindingPath_Keys);
|
||||
var valuesProperty = property.FindPropertyRelative(SerializedDictionary<int, Components.RiveTextureRenderer.PropertyNameListHolder>.BindingPath_Values);
|
||||
|
||||
// Pre-create property holders for all materials
|
||||
EnsurePropertyHoldersExist(keysProperty, valuesProperty, materials.Length);
|
||||
|
||||
for (int i = 0; i < materials.Length; i++)
|
||||
{
|
||||
var material = materials[i];
|
||||
if (material == null) continue;
|
||||
|
||||
var materialFoldout = new Foldout { text = $"Material {i}: {material.name}" };
|
||||
m_root.Add(materialFoldout);
|
||||
|
||||
var propertyListHolder = FindPropertyListHolder(keysProperty, valuesProperty, i);
|
||||
if (propertyListHolder != null)
|
||||
{
|
||||
var propertyList = propertyListHolder.FindPropertyRelative(Components.RiveTextureRenderer.PropertyNameListHolder.BindingPath_PropertyNames);
|
||||
if (propertyList != null && propertyList.serializedObject != null)
|
||||
{
|
||||
var listView = CreateListView(propertyList);
|
||||
materialFoldout.Add(listView);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Apply any changes made during setup
|
||||
property.serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
private void EnsurePropertyHoldersExist(SerializedProperty keysProperty, SerializedProperty valuesProperty, int materialCount)
|
||||
{
|
||||
// First, create a list of existing material indices
|
||||
var existingIndices = new HashSet<int>();
|
||||
for (int i = 0; i < keysProperty.arraySize; i++)
|
||||
{
|
||||
existingIndices.Add(keysProperty.GetArrayElementAtIndex(i).intValue);
|
||||
}
|
||||
|
||||
// Create missing property holders
|
||||
for (int i = 0; i < materialCount; i++)
|
||||
{
|
||||
if (!existingIndices.Contains(i))
|
||||
{
|
||||
keysProperty.InsertArrayElementAtIndex(keysProperty.arraySize);
|
||||
keysProperty.GetArrayElementAtIndex(keysProperty.arraySize - 1).intValue = i;
|
||||
|
||||
valuesProperty.InsertArrayElementAtIndex(valuesProperty.arraySize);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private SerializedProperty FindPropertyListHolder(SerializedProperty keysProperty, SerializedProperty valuesProperty, int materialIndex)
|
||||
{
|
||||
for (int i = 0; i < keysProperty.arraySize; i++)
|
||||
{
|
||||
if (keysProperty.GetArrayElementAtIndex(i).intValue == materialIndex)
|
||||
{
|
||||
return valuesProperty.GetArrayElementAtIndex(i);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private ListView CreateListView(SerializedProperty propertyList)
|
||||
{
|
||||
var listView = new ListView()
|
||||
{
|
||||
reorderable = true,
|
||||
showAddRemoveFooter = true,
|
||||
showBorder = true,
|
||||
showFoldoutHeader = false,
|
||||
showBoundCollectionSize = false,
|
||||
virtualizationMethod = CollectionVirtualizationMethod.DynamicHeight
|
||||
};
|
||||
|
||||
// Delay binding until the next frame to ensure proper initialization
|
||||
m_root.schedule.Execute(() =>
|
||||
{
|
||||
listView.bindingPath = propertyList.propertyPath;
|
||||
listView.BindProperty(propertyList.serializedObject);
|
||||
});
|
||||
|
||||
listView.makeItem = () => new PopupOrTextField(m_availablePropertyNames, "");
|
||||
listView.bindItem = (element, index) =>
|
||||
{
|
||||
var popupOrTextField = element as PopupOrTextField;
|
||||
popupOrTextField.Choices = m_availablePropertyNames;
|
||||
|
||||
if (propertyList != null && propertyList.serializedObject != null)
|
||||
{
|
||||
var itemProperty = propertyList.GetArrayElementAtIndex(index);
|
||||
popupOrTextField.BindProperty(itemProperty);
|
||||
}
|
||||
};
|
||||
|
||||
listView.itemsAdded += (indexes) =>
|
||||
{
|
||||
if (propertyList != null && propertyList.serializedObject != null)
|
||||
{
|
||||
foreach (int index in indexes)
|
||||
{
|
||||
var itemProperty = propertyList.GetArrayElementAtIndex(index);
|
||||
if (string.IsNullOrEmpty(itemProperty.stringValue))
|
||||
{
|
||||
itemProperty.stringValue = m_availablePropertyNames.FirstOrDefault() ?? "";
|
||||
propertyList.serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
listView.Rebuild();
|
||||
};
|
||||
|
||||
return listView;
|
||||
}
|
||||
|
||||
private static int GetPropertyCount(Shader shader)
|
||||
{
|
||||
#if UNITY_6000_3_OR_NEWER
|
||||
return shader.GetPropertyCount();
|
||||
#else
|
||||
return ShaderUtil.GetPropertyCount(shader);
|
||||
#endif
|
||||
}
|
||||
|
||||
private static MaterialShaderPropertyType GetPropertyType(Shader shader, int index)
|
||||
{
|
||||
#if UNITY_6000_3_OR_NEWER
|
||||
return shader.GetPropertyType(index);
|
||||
#else
|
||||
return ShaderUtil.GetPropertyType(shader, index);
|
||||
#endif
|
||||
}
|
||||
|
||||
private static string GetPropertyName(Shader shader, int index)
|
||||
{
|
||||
#if UNITY_6000_3_OR_NEWER
|
||||
return shader.GetPropertyName(index);
|
||||
#else
|
||||
return ShaderUtil.GetPropertyName(shader, index);
|
||||
#endif
|
||||
}
|
||||
|
||||
private void UpdateAvailablePropertyNames(Material[] materials, MaterialShaderPropertyType propertyType)
|
||||
{
|
||||
m_availablePropertyNames.Clear();
|
||||
|
||||
foreach (var material in materials)
|
||||
{
|
||||
if (material != null)
|
||||
{
|
||||
var shader = material.shader;
|
||||
for (int i = 0; i < GetPropertyCount(shader); i++)
|
||||
{
|
||||
if (GetPropertyType(shader, i) == propertyType)
|
||||
{
|
||||
string propertyName = GetPropertyName(shader, i);
|
||||
if (!m_availablePropertyNames.Contains(propertyName))
|
||||
{
|
||||
m_availablePropertyNames.Add(propertyName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 13ea997b79c3b4e1b82a9adeabd70082
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 350858
|
||||
packageName: Rive
|
||||
packageVersion: 0.4.2
|
||||
assetPath: Packages/app.rive.rive-unity/Editor/Components/CustomElements/MaterialPropertiesDrawer.cs
|
||||
uploadId: 896810
|
||||
@@ -0,0 +1,445 @@
|
||||
using UnityEngine.UIElements;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEditor.UIElements;
|
||||
using Rive.Utils;
|
||||
|
||||
namespace Rive.EditorTools
|
||||
{
|
||||
/// <summary>
|
||||
/// A visual element that allows the user to select from a list of choices or enter a custom value.
|
||||
/// </summary>
|
||||
internal class PopupOrTextField : VisualElement, INotifyValueChanged<string>
|
||||
{
|
||||
private PopupField<string> popupField;
|
||||
private TextField textField;
|
||||
private Button switchModeButton;
|
||||
private bool isCustomValue;
|
||||
private bool isUserEditing;
|
||||
private bool isProgrammaticChange;
|
||||
private SerializedProperty boundProperty;
|
||||
private SerializedObject serializedObject;
|
||||
private UnityEngine.Object targetObject;
|
||||
|
||||
private string m_Value;
|
||||
public string value
|
||||
{
|
||||
get => m_Value;
|
||||
set
|
||||
{
|
||||
if (m_Value != value)
|
||||
{
|
||||
using (var changeEvent = ChangeEvent<string>.GetPooled(m_Value, value))
|
||||
{
|
||||
changeEvent.target = this;
|
||||
SetValueWithoutNotify(value);
|
||||
SendEvent(changeEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<string> Choices
|
||||
{
|
||||
get => popupField.choices;
|
||||
set
|
||||
{
|
||||
popupField.choices = value;
|
||||
bool valueIsInChoices = value.Contains(m_Value);
|
||||
|
||||
// Handle transition from Popup to Custom
|
||||
if (!isCustomValue && !valueIsInChoices)
|
||||
{
|
||||
isCustomValue = true;
|
||||
isProgrammaticChange = true;
|
||||
SetValueWithoutNotify(m_Value);
|
||||
isProgrammaticChange = false;
|
||||
}
|
||||
// Handle transition from Custom to Popup
|
||||
else if (valueIsInChoices && isCustomValue)
|
||||
{
|
||||
isCustomValue = false;
|
||||
isProgrammaticChange = true;
|
||||
SetValueWithoutNotify(m_Value);
|
||||
isProgrammaticChange = false;
|
||||
}
|
||||
|
||||
UpdateVisibility();
|
||||
}
|
||||
}
|
||||
|
||||
public string Label
|
||||
{
|
||||
get => popupField.label;
|
||||
set
|
||||
{
|
||||
popupField.label = value;
|
||||
textField.label = value;
|
||||
}
|
||||
}
|
||||
|
||||
public PopupOrTextField() : this(new List<string>(), "") { }
|
||||
|
||||
public PopupOrTextField(List<string> choices, string currentValue, string labelText = null)
|
||||
{
|
||||
popupField = new PopupField<string>(choices, 0);
|
||||
textField = new TextField();
|
||||
switchModeButton = new Button(ToggleMode)
|
||||
{
|
||||
text = "✎",
|
||||
tooltip = "Switch to text input"
|
||||
};
|
||||
|
||||
SetupUI();
|
||||
SetupCallbacks();
|
||||
SetInitialState(currentValue);
|
||||
|
||||
if (labelText != null)
|
||||
{
|
||||
Label = labelText;
|
||||
}
|
||||
|
||||
RegisterCallback<SerializedPropertyChangeEvent>(OnSerializedPropertyChange);
|
||||
}
|
||||
|
||||
private void SetupUI()
|
||||
{
|
||||
var container = new VisualElement();
|
||||
container.style.flexDirection = FlexDirection.Row;
|
||||
container.style.width = new StyleLength(Length.Percent(100));
|
||||
container.Add(popupField);
|
||||
container.Add(textField);
|
||||
container.Add(switchModeButton);
|
||||
|
||||
SetupFieldStyles(popupField);
|
||||
SetupFieldStyles(textField);
|
||||
SetupButtonStyles(switchModeButton);
|
||||
|
||||
textField.style.display = DisplayStyle.None;
|
||||
textField.visible = false;
|
||||
popupField.style.display = DisplayStyle.Flex;
|
||||
popupField.visible = true;
|
||||
|
||||
Add(container);
|
||||
}
|
||||
|
||||
private void SetupFieldStyles(VisualElement field)
|
||||
{
|
||||
// This keeps inspector positioned around the same point as other unity fields. Otherwise the popup fills the whole row, when it should stop in the middle.
|
||||
field.AddToClassList(BaseField<PropertyField>.alignedFieldUssClassName); // Same as using "unity-base-field__aligned" in UXML
|
||||
|
||||
|
||||
field.style.flexGrow = 1;
|
||||
field.style.marginRight = 20;
|
||||
field.style.paddingBottom = 0;
|
||||
field.style.paddingTop = 0;
|
||||
field.style.paddingLeft = 0;
|
||||
field.style.marginBottom = 0;
|
||||
field.style.marginTop = 0;
|
||||
field.style.marginLeft = 0;
|
||||
}
|
||||
|
||||
private void SetupButtonStyles(Button button)
|
||||
{
|
||||
button.style.position = Position.Absolute;
|
||||
button.style.right = 0;
|
||||
button.style.width = 20;
|
||||
button.style.height = popupField.style.height;
|
||||
button.style.marginRight = 0;
|
||||
button.style.marginLeft = 0;
|
||||
button.style.marginTop = 0;
|
||||
button.style.marginBottom = 0;
|
||||
button.style.paddingBottom = 0;
|
||||
button.style.paddingTop = 0;
|
||||
button.style.paddingLeft = 0;
|
||||
button.style.paddingRight = 0;
|
||||
}
|
||||
|
||||
|
||||
private void SetupCallbacks()
|
||||
{
|
||||
popupField.RegisterValueChangedCallback(evt =>
|
||||
{
|
||||
if (isProgrammaticChange)
|
||||
return; // Ignore programmatic changes to prevent recursive calls
|
||||
|
||||
value = evt.newValue;
|
||||
});
|
||||
|
||||
textField.RegisterCallback<FocusInEvent>(evt => isUserEditing = true);
|
||||
textField.RegisterCallback<FocusOutEvent>(evt =>
|
||||
{
|
||||
isUserEditing = false;
|
||||
UpdateVisualState();
|
||||
});
|
||||
|
||||
textField.RegisterValueChangedCallback(evt =>
|
||||
{
|
||||
if (isProgrammaticChange)
|
||||
return;
|
||||
|
||||
value = evt.newValue;
|
||||
});
|
||||
}
|
||||
|
||||
private void SetInitialState(string initialValue)
|
||||
{
|
||||
m_Value = initialValue;
|
||||
isCustomValue = !Choices.Contains(initialValue);
|
||||
|
||||
if (!isCustomValue)
|
||||
{
|
||||
popupField.SetValueWithoutNotify(initialValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
textField.SetValueWithoutNotify(initialValue);
|
||||
}
|
||||
|
||||
UpdateVisibility();
|
||||
}
|
||||
|
||||
private void ToggleMode()
|
||||
{
|
||||
if (targetObject != null)
|
||||
{
|
||||
Undo.RecordObject(targetObject, "Toggle PopupOrTextField Mode");
|
||||
}
|
||||
|
||||
var initialValue = m_Value;
|
||||
isCustomValue = !isCustomValue;
|
||||
|
||||
if (isCustomValue)
|
||||
{
|
||||
textField.SetValueWithoutNotify(m_Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Choices.Contains(m_Value))
|
||||
{
|
||||
popupField.SetValueWithoutNotify(m_Value);
|
||||
}
|
||||
else if (Choices.Count > 0)
|
||||
{
|
||||
SetValueWithoutNotify(Choices[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
popupField.SetValueWithoutNotify(string.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
UpdateVisibility();
|
||||
|
||||
if (targetObject != null)
|
||||
{
|
||||
EditorUtility.SetDirty(targetObject);
|
||||
}
|
||||
|
||||
if (initialValue != m_Value)
|
||||
{
|
||||
using (var changeEvent = ChangeEvent<string>.GetPooled(initialValue, m_Value))
|
||||
{
|
||||
changeEvent.target = this;
|
||||
SendEvent(changeEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateVisualState()
|
||||
{
|
||||
bool valueInChoices = Choices.Contains(m_Value);
|
||||
|
||||
if (valueInChoices)
|
||||
{
|
||||
if (!isCustomValue)
|
||||
{
|
||||
// We make sure the popupField reflects the current value
|
||||
popupField.SetValueWithoutNotify(m_Value);
|
||||
}
|
||||
|
||||
if (isCustomValue && !isUserEditing)
|
||||
{
|
||||
isCustomValue = false;
|
||||
UpdateVisibility();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
textField.SetValueWithoutNotify(m_Value);
|
||||
if (!isCustomValue)
|
||||
{
|
||||
isCustomValue = true;
|
||||
UpdateVisibility();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateVisibility()
|
||||
{
|
||||
if (isCustomValue)
|
||||
{
|
||||
popupField.style.display = DisplayStyle.None;
|
||||
popupField.visible = false;
|
||||
|
||||
textField.style.display = DisplayStyle.Flex;
|
||||
textField.visible = true;
|
||||
|
||||
switchModeButton.text = "▼";
|
||||
switchModeButton.tooltip = "Switch to dropdown";
|
||||
}
|
||||
else
|
||||
{
|
||||
textField.style.display = DisplayStyle.None;
|
||||
textField.visible = false;
|
||||
|
||||
popupField.style.display = DisplayStyle.Flex;
|
||||
popupField.visible = true;
|
||||
|
||||
switchModeButton.text = "✎";
|
||||
switchModeButton.tooltip = "Switch to text input";
|
||||
}
|
||||
|
||||
this.MarkDirtyRepaint();
|
||||
}
|
||||
|
||||
public void SetValueWithoutNotify(string newValue)
|
||||
{
|
||||
if (serializedObject != null)
|
||||
{
|
||||
serializedObject.Update();
|
||||
}
|
||||
|
||||
m_Value = newValue;
|
||||
|
||||
// Force check if value is in choices and update mode accordingly
|
||||
bool valueInChoices = Choices.Contains(newValue);
|
||||
|
||||
if (valueInChoices && (!isUserEditing || isProgrammaticChange))
|
||||
{
|
||||
isCustomValue = false;
|
||||
isProgrammaticChange = true;
|
||||
popupField.SetValueWithoutNotify(newValue);
|
||||
isProgrammaticChange = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!valueInChoices)
|
||||
{
|
||||
isCustomValue = true;
|
||||
}
|
||||
isProgrammaticChange = true;
|
||||
textField.SetValueWithoutNotify(newValue);
|
||||
isProgrammaticChange = false;
|
||||
}
|
||||
|
||||
UpdateVisibility();
|
||||
|
||||
if (boundProperty != null)
|
||||
{
|
||||
boundProperty.stringValue = newValue;
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnSerializedPropertyChange(SerializedPropertyChangeEvent evt)
|
||||
{
|
||||
if (evt.changedProperty == boundProperty)
|
||||
{
|
||||
isProgrammaticChange = true;
|
||||
SetValueWithoutNotify(boundProperty.stringValue);
|
||||
isProgrammaticChange = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void BindProperty(SerializedProperty property)
|
||||
{
|
||||
UnbindProperty();
|
||||
|
||||
if (property != null && property.propertyType == SerializedPropertyType.String)
|
||||
{
|
||||
boundProperty = property;
|
||||
serializedObject = property.serializedObject;
|
||||
targetObject = serializedObject.targetObject;
|
||||
SetInitialState(property.stringValue);
|
||||
EditorApplication.update += UpdateFromSerializedProperty;
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugLogger.Instance.LogError("PopupOrTextField: Attempted to bind to a null or non-string property.");
|
||||
}
|
||||
|
||||
this.RegisterCallback<AttachToPanelEvent>(OnAttachToPanel);
|
||||
this.RegisterCallback<DetachFromPanelEvent>(OnDetachFromPanel);
|
||||
}
|
||||
|
||||
private void OnAttachToPanel(AttachToPanelEvent evt)
|
||||
{
|
||||
if (serializedObject != null && boundProperty != null)
|
||||
{
|
||||
serializedObject.Update();
|
||||
SetInitialState(boundProperty.stringValue);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDetachFromPanel(DetachFromPanelEvent evt)
|
||||
{
|
||||
UnbindProperty();
|
||||
}
|
||||
|
||||
private void UpdateFromSerializedProperty()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (serializedObject == null || boundProperty == null)
|
||||
{
|
||||
UnbindProperty();
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if the serializedObject is still valid
|
||||
if (serializedObject.targetObject == null)
|
||||
{
|
||||
UnbindProperty();
|
||||
return;
|
||||
}
|
||||
|
||||
serializedObject.Update();
|
||||
|
||||
// Double-check everything is still valid after the update
|
||||
if (boundProperty == null || boundProperty.serializedObject == null || boundProperty.serializedObject.targetObject == null)
|
||||
{
|
||||
UnbindProperty();
|
||||
return;
|
||||
}
|
||||
|
||||
if (boundProperty.propertyType == SerializedPropertyType.String)
|
||||
{
|
||||
string newValue = boundProperty.stringValue;
|
||||
if (m_Value != newValue && !isUserEditing)
|
||||
{
|
||||
SetValueWithoutNotify(newValue);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugLogger.Instance.LogWarning($"PopupOrTextField: Bound property is not a string. Property path: {boundProperty.propertyPath}");
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
UnbindProperty();
|
||||
}
|
||||
}
|
||||
|
||||
private void UnbindProperty()
|
||||
{
|
||||
boundProperty = null;
|
||||
serializedObject = null;
|
||||
targetObject = null;
|
||||
EditorApplication.update -= UpdateFromSerializedProperty;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 226b35944e5bc4908b226f5fb91d99d2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 350858
|
||||
packageName: Rive
|
||||
packageVersion: 0.4.2
|
||||
assetPath: Packages/app.rive.rive-unity/Editor/Components/CustomElements/PopupOrTextField.cs
|
||||
uploadId: 896810
|
||||
@@ -0,0 +1,37 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using UnityEngine.UIElements;
|
||||
using Rive.Utils;
|
||||
|
||||
namespace Rive.EditorTools
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(WidthHeightDimensionsAttribute))]
|
||||
internal class WidthHeightDimensionsDrawer : PropertyDrawer
|
||||
{
|
||||
public override VisualElement CreatePropertyGUI(SerializedProperty property)
|
||||
{
|
||||
var attr = attribute as WidthHeightDimensionsAttribute;
|
||||
var label = ReflectionUtils.GetPropertyLabel(property) ?? attr.Label;
|
||||
|
||||
// Get tooltip from TooltipAttribute if present
|
||||
string tooltip = null;
|
||||
var tooltipAttribute = fieldInfo.GetCustomAttributes(typeof(TooltipAttribute), true);
|
||||
if (tooltipAttribute.Length > 0)
|
||||
{
|
||||
tooltip = (tooltipAttribute[0] as TooltipAttribute).tooltip;
|
||||
}
|
||||
|
||||
var field = new WidthHeightDimensionsField(
|
||||
label,
|
||||
attr.WidthLabel,
|
||||
attr.HeightLabel,
|
||||
tooltip
|
||||
);
|
||||
|
||||
field.BindProperty(property);
|
||||
return field;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d32c71bc31ac443d5a36065d1d672d12
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 350858
|
||||
packageName: Rive
|
||||
packageVersion: 0.4.2
|
||||
assetPath: Packages/app.rive.rive-unity/Editor/Components/CustomElements/WidthHeightDimensionsDrawer.cs
|
||||
uploadId: 896810
|
||||
@@ -0,0 +1,50 @@
|
||||
using UnityEngine.UIElements;
|
||||
using UnityEditor.UIElements;
|
||||
using UnityEditor;
|
||||
|
||||
namespace Rive.EditorTools
|
||||
{
|
||||
/// <summary>
|
||||
/// A field for editing a Vector2Int representing width and height.
|
||||
/// </summary>
|
||||
internal class WidthHeightDimensionsField : VisualElement
|
||||
{
|
||||
|
||||
public IntegerField WidthField { get; private set; }
|
||||
public IntegerField HeightField { get; private set; }
|
||||
|
||||
public WidthHeightDimensionsField(string label, string widthLabel = "Width", string heightLabel = "Height", string tooltip = null)
|
||||
{
|
||||
var foldout = new Foldout
|
||||
{
|
||||
text = label,
|
||||
tooltip = tooltip,
|
||||
value = true // Start expanded
|
||||
};
|
||||
Add(foldout);
|
||||
|
||||
var container = new VisualElement();
|
||||
foldout.Add(container);
|
||||
|
||||
WidthField = new IntegerField(widthLabel)
|
||||
{
|
||||
style = { marginTop = 4 }
|
||||
};
|
||||
WidthField.AddToClassList(BaseField<int>.alignedFieldUssClassName);
|
||||
container.Add(WidthField);
|
||||
|
||||
HeightField = new IntegerField(heightLabel)
|
||||
{
|
||||
style = { marginTop = 4 }
|
||||
};
|
||||
HeightField.AddToClassList(BaseField<int>.alignedFieldUssClassName);
|
||||
container.Add(HeightField);
|
||||
}
|
||||
|
||||
public void BindProperty(SerializedProperty property)
|
||||
{
|
||||
WidthField.BindProperty(property.FindPropertyRelative("x"));
|
||||
HeightField.BindProperty(property.FindPropertyRelative("y"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 18c92b4c6ab3f42e6a1e827ed99c91fa
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 350858
|
||||
packageName: Rive
|
||||
packageVersion: 0.4.2
|
||||
assetPath: Packages/app.rive.rive-unity/Editor/Components/CustomElements/WidthHeightDimensionsField.cs
|
||||
uploadId: 896810
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f3793298efdc946ffb5185da184f3cf6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 350858
|
||||
packageName: Rive
|
||||
packageVersion: 0.4.2
|
||||
assetPath: Packages/app.rive.rive-unity/Editor/Components/DataBindingPlaygroundWindow.cs
|
||||
uploadId: 896810
|
||||
383
Packages/app.rive.rive-unity/Editor/Components/MenuItems.cs
Normal file
@@ -0,0 +1,383 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using Rive.Components;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
[assembly: InternalsVisibleTo("Rive.Tests.Editor")]
|
||||
namespace Rive.EditorTools
|
||||
{
|
||||
/// <summary>
|
||||
/// Custom menu items for creating Rive components.
|
||||
/// </summary>
|
||||
//Make internals visible to test assembly
|
||||
internal class MenuItems
|
||||
{
|
||||
internal enum PanelContext
|
||||
{
|
||||
Standalone = 0,
|
||||
Canvas = 1
|
||||
}
|
||||
|
||||
[MenuItem("GameObject/Rive/Rive Panel", false, 10)]
|
||||
static void CreateRivePanel(MenuCommand menuCommand) =>
|
||||
CreateRivePanelInternal(menuCommand, PanelContext.Standalone);
|
||||
|
||||
[MenuItem("GameObject/Rive/Rive Panel (Canvas)", false, 11)]
|
||||
static void CreateRivePanelWithCanvas(MenuCommand menuCommand) =>
|
||||
CreateRivePanelInternal(menuCommand, PanelContext.Canvas);
|
||||
|
||||
[MenuItem("GameObject/Rive/Widgets/Rive Widget", false, 12)]
|
||||
static void CreateRiveWidget(MenuCommand menuCommand)
|
||||
{
|
||||
GameObject widgetObj = new GameObject("Rive Widget", typeof(RiveWidget));
|
||||
|
||||
// If we have a context (selected object), try to parent to it
|
||||
GameObject parent = menuCommand.context as GameObject;
|
||||
if (parent != null)
|
||||
{
|
||||
GameObjectUtility.SetParentAndAlign(widgetObj, parent);
|
||||
|
||||
ConfigureRectTransformToFill(widgetObj.GetComponent<RectTransform>());
|
||||
|
||||
}
|
||||
|
||||
Undo.RegisterCreatedObjectUndo(widgetObj, "Create Rive Widget");
|
||||
Selection.activeObject = widgetObj;
|
||||
}
|
||||
|
||||
[MenuItem("GameObject/Rive/Widgets/Procedural Rive Widget", false, 13)]
|
||||
static void CreateProceduralRiveWidget(MenuCommand menuCommand)
|
||||
{
|
||||
GameObject widgetObj = new GameObject("Procedural Rive Widget", typeof(ProceduralRiveWidget));
|
||||
|
||||
// If we have a context (selected object), try to parent to it
|
||||
GameObject parent = menuCommand.context as GameObject;
|
||||
if (parent != null)
|
||||
{
|
||||
GameObjectUtility.SetParentAndAlign(widgetObj, parent);
|
||||
|
||||
ConfigureRectTransformToFill(widgetObj.GetComponent<RectTransform>());
|
||||
|
||||
}
|
||||
|
||||
Undo.RegisterCreatedObjectUndo(widgetObj, "Create Procedural Rive Widget");
|
||||
Selection.activeObject = widgetObj;
|
||||
}
|
||||
|
||||
|
||||
|
||||
[MenuItem("GameObject/Rive/Render Target Strategies/Atlas Render Target Strategy", false, 21)]
|
||||
static void CreateAtlasRenderTargetStrategy(MenuCommand menuCommand) =>
|
||||
CreateRenderTargetStrategy<AtlasRenderTargetStrategy>(menuCommand);
|
||||
|
||||
[MenuItem("GameObject/Rive/Render Target Strategies/Pooled Render Target Strategy", false, 22)]
|
||||
static void CreatePooledRenderTargetStrategy(MenuCommand menuCommand) =>
|
||||
CreateRenderTargetStrategy<PooledRenderTargetStrategy>(menuCommand);
|
||||
|
||||
private static void CreateRenderTargetStrategy<T>(MenuCommand menuCommand) where T : RenderTargetStrategy
|
||||
{
|
||||
string typeName = typeof(T).Name;
|
||||
string objectName = ObjectNames.NicifyVariableName(typeName);
|
||||
|
||||
GameObject obj = new GameObject(objectName, typeof(T));
|
||||
GameObjectUtility.SetParentAndAlign(obj, menuCommand.context as GameObject);
|
||||
|
||||
Undo.RegisterCreatedObjectUndo(obj, $"Create {objectName}");
|
||||
Selection.activeObject = obj;
|
||||
}
|
||||
|
||||
internal static RivePanel CreateRivePanelInternal(MenuCommand menuCommand, PanelContext context)
|
||||
{
|
||||
GameObject rootObject;
|
||||
GameObject panelObj;
|
||||
|
||||
if (context == PanelContext.Canvas)
|
||||
{
|
||||
// Check if we already have a canvas parent
|
||||
Canvas parentCanvas = null;
|
||||
GameObject contextObj = menuCommand.context as GameObject;
|
||||
if (contextObj != null)
|
||||
{
|
||||
parentCanvas = contextObj.GetComponentInParent<Canvas>();
|
||||
}
|
||||
|
||||
if (parentCanvas != null)
|
||||
{
|
||||
// Use existing canvas as root
|
||||
rootObject = parentCanvas.gameObject;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Create new canvas
|
||||
rootObject = new GameObject("Canvas", typeof(Canvas), typeof(CanvasScaler), typeof(GraphicRaycaster));
|
||||
GameObjectUtility.SetParentAndAlign(rootObject, contextObj);
|
||||
rootObject.GetComponent<Canvas>().renderMode = RenderMode.ScreenSpaceOverlay;
|
||||
}
|
||||
|
||||
panelObj = new GameObject("Rive Panel", typeof(RivePanel), typeof(RiveCanvasRenderer));
|
||||
panelObj.transform.SetParent(rootObject.transform, false);
|
||||
|
||||
var renderer = panelObj.GetComponent<RiveCanvasRenderer>();
|
||||
renderer.RivePanel = panelObj.GetComponent<RivePanel>();
|
||||
|
||||
// Canvas panel fills parent
|
||||
ConfigureRectTransformToFill(panelObj.GetComponent<RectTransform>());
|
||||
}
|
||||
else
|
||||
{
|
||||
panelObj = new GameObject("Rive Panel", typeof(RectTransform), typeof(RivePanel));
|
||||
GameObjectUtility.SetParentAndAlign(panelObj, menuCommand.context as GameObject);
|
||||
rootObject = panelObj;
|
||||
|
||||
// Standalone panel uses absolute size
|
||||
panelObj.GetComponent<RivePanel>().SetDimensions(new Vector2(1920, 1080));
|
||||
}
|
||||
|
||||
// Temporarily disable so that re-enabling the gameobjects triggers a refresh when everything is set up. Otherwise, the RivePanel might not be initialized correctly for editor preview.
|
||||
panelObj.SetActive(false);
|
||||
|
||||
// Create and configure widget. We also want it to fill the parent.
|
||||
GameObject widgetObj = new GameObject("Rive Widget", typeof(RectTransform), typeof(RiveWidget));
|
||||
widgetObj.transform.SetParent(panelObj.transform, false);
|
||||
ConfigureRectTransformToFill(widgetObj.GetComponent<RectTransform>());
|
||||
|
||||
// Re-enable panel after everything is set up so that the editor preview has enough information to render the panel
|
||||
panelObj.SetActive(true);
|
||||
|
||||
// Register undo and select the panel so that the user can start editing it right away
|
||||
Undo.RegisterCreatedObjectUndo(rootObject, $"Create Rive Panel{(context == PanelContext.Canvas ? " with Canvas" : "")}");
|
||||
Selection.activeObject = widgetObj;
|
||||
|
||||
return panelObj.GetComponent<RivePanel>();
|
||||
}
|
||||
|
||||
internal static void ConfigureRectTransformToFill(RectTransform rect)
|
||||
{
|
||||
rect.anchorMin = Vector2.zero;
|
||||
rect.anchorMax = Vector2.one;
|
||||
rect.sizeDelta = Vector2.zero;
|
||||
}
|
||||
|
||||
|
||||
[InitializeOnLoadMethod]
|
||||
static void OnLoad()
|
||||
{
|
||||
#if UNITY_6000_3_OR_NEWER
|
||||
DragAndDrop.AddDropHandlerV2(OnSceneDrop);
|
||||
DragAndDrop.AddDropHandlerV2(OnHierarchyDropV2);
|
||||
#else
|
||||
DragAndDrop.AddDropHandler(OnSceneDrop);
|
||||
DragAndDrop.AddDropHandler(OnHierarchyDrop);
|
||||
#endif
|
||||
}
|
||||
|
||||
private static bool ValidateRiveAssetDrag()
|
||||
{
|
||||
if (DragAndDrop.objectReferences.Length != 1)
|
||||
return false;
|
||||
|
||||
return DragAndDrop.objectReferences[0] is Asset;
|
||||
}
|
||||
|
||||
private static DragAndDropVisualMode OnSceneDrop(Object dropUpon, Vector3 worldPosition, Vector2 viewportPosition, Transform parentForDraggedObjects, bool perform)
|
||||
{
|
||||
if (!ValidateRiveAssetDrag())
|
||||
{
|
||||
return DragAndDropVisualMode.None;
|
||||
}
|
||||
|
||||
if (perform)
|
||||
{
|
||||
Asset riveAsset = DragAndDrop.objectReferences[0] as Asset;
|
||||
|
||||
if (riveAsset == null)
|
||||
return DragAndDropVisualMode.Rejected;
|
||||
|
||||
GameObject parentObject = dropUpon as GameObject;
|
||||
Transform parentTransform = parentObject != null ? parentObject.transform : null;
|
||||
HandleAssetDrop(riveAsset, parentTransform);
|
||||
}
|
||||
return DragAndDropVisualMode.Move;
|
||||
}
|
||||
|
||||
private static UnityEngine.EventSystems.EventSystem GetExistingEventSystem()
|
||||
{
|
||||
|
||||
#if UNITY_6000_0_OR_NEWER
|
||||
return Object.FindFirstObjectByType<UnityEngine.EventSystems.EventSystem>();
|
||||
#else
|
||||
return Object.FindObjectOfType<UnityEngine.EventSystems.EventSystem>();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
private static void EnsureEventSystemExists()
|
||||
{
|
||||
|
||||
if (GetExistingEventSystem() == null)
|
||||
{
|
||||
GameObject eventSystem = new GameObject("EventSystem",
|
||||
typeof(UnityEngine.EventSystems.EventSystem),
|
||||
typeof(UnityEngine.EventSystems.StandaloneInputModule));
|
||||
|
||||
Undo.RegisterCreatedObjectUndo(eventSystem, "Create EventSystem");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles dropping a Rive asset onto a game object in the heirarchy/scene.
|
||||
/// </summary>
|
||||
/// <param name="riveAsset"> The Rive asset to drop. </param>
|
||||
/// <param name="parent"> The parent transform to drop the asset under. </param>
|
||||
internal static void HandleAssetDrop(Asset riveAsset, Transform parent)
|
||||
{
|
||||
// If the RivePanel is just dropped into the scene, we want to create a standalone panel that displays within a canvas.
|
||||
// However, when the panel is dropped onto a game object with a MeshRenderer, we want to create a standalone RivePanel, then add a RiveTextureRenderer to the meshrenderer game object.
|
||||
|
||||
// Create a group for all undo operations so we can collapse them into a single undo step at the end
|
||||
Undo.IncrementCurrentGroup();
|
||||
var undoGroupIndex = Undo.GetCurrentGroup();
|
||||
|
||||
// Check if we're dropping onto or under an existing RivePanel
|
||||
RivePanel existingPanel = null;
|
||||
if (parent != null)
|
||||
{
|
||||
existingPanel = parent.GetComponent<RivePanel>();
|
||||
|
||||
|
||||
if (existingPanel == null)
|
||||
{
|
||||
|
||||
existingPanel = parent.GetComponentInParent<RivePanel>();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// If we're under an existing panel, we want to create a widget under it, instead of creating a new panel.
|
||||
if (existingPanel != null)
|
||||
{
|
||||
|
||||
RiveWidget parentWidget = parent.GetComponentInParent<RiveWidget>();
|
||||
|
||||
// If the parent is a widget, we want to create the new widget as a sibling to the parent widget.
|
||||
// Nesting widgets works, but we don't want to encourage it as it might lead to unexpected behavior.
|
||||
Transform parentTransform = parentWidget != null ? parentWidget.transform.parent : parent;
|
||||
|
||||
GameObject widgetObj = new GameObject("Rive Widget", typeof(RiveWidget));
|
||||
GameObjectUtility.SetParentAndAlign(widgetObj, parentTransform.gameObject);
|
||||
ConfigureRectTransformToFill(widgetObj.GetComponent<RectTransform>());
|
||||
|
||||
var riveWidget = widgetObj.GetComponent<RiveWidget>();
|
||||
Undo.RecordObject(riveWidget, "Set Rive Asset Reference");
|
||||
riveWidget.SetEditorAssetReference(riveAsset);
|
||||
|
||||
Undo.RegisterCreatedObjectUndo(widgetObj, "Create Rive Widget");
|
||||
Selection.activeObject = widgetObj;
|
||||
|
||||
Undo.CollapseUndoOperations(undoGroupIndex);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
PanelContext context = PanelContext.Canvas;
|
||||
GameObject parentGameObject = parent != null ? parent.gameObject : null;
|
||||
GameObject meshRendererGameObject = parentGameObject;
|
||||
|
||||
if (parent != null)
|
||||
{
|
||||
if (parentGameObject.GetComponent<MeshRenderer>() != null)
|
||||
{
|
||||
context = PanelContext.Standalone;
|
||||
|
||||
// We also clear the parent object so that the panel is created as a standalone object in the scene
|
||||
// This might change in the future, but we do this to avoid a bunch of issues that might come from the parent potentially having non-uniform scale, which would affect the RivePanel's rendering.
|
||||
// We also want to avoid unnecessarily re-drawing the panel when the parent object transform is updated.
|
||||
parentGameObject = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
RivePanel panel = CreateRivePanelInternal(new MenuCommand(parentGameObject), context);
|
||||
Undo.RegisterFullObjectHierarchyUndo(panel.gameObject, "Create Rive Panel");
|
||||
|
||||
var widget = panel.GetComponentInChildren<RiveWidget>();
|
||||
if (widget != null)
|
||||
{
|
||||
Undo.RecordObject(widget, "Set Rive Asset Reference");
|
||||
widget.SetEditorAssetReference(riveAsset);
|
||||
}
|
||||
|
||||
if (context == PanelContext.Standalone && meshRendererGameObject != null)
|
||||
{
|
||||
if (meshRendererGameObject != null)
|
||||
{
|
||||
// Add a RiveTextureRenderer to the meshRendererGameObject object so that the RivePanel is rendered there.
|
||||
RiveTextureRenderer textureRenderer;
|
||||
if (!meshRendererGameObject.TryGetComponent<RiveTextureRenderer>(out textureRenderer))
|
||||
{
|
||||
textureRenderer = Undo.AddComponent<RiveTextureRenderer>(meshRendererGameObject);
|
||||
}
|
||||
|
||||
Undo.RecordObject(textureRenderer, "Set Rive Panel Reference");
|
||||
textureRenderer.RivePanel = panel;
|
||||
}
|
||||
|
||||
// Set the Panel dimensions to match the default Artboard's size so that the RivePanel is rendered with the correct aspect ratio.
|
||||
if (riveAsset.EditorOnlyMetadata.Artboards.Count > 0)
|
||||
{
|
||||
|
||||
FileMetadata.ArtboardMetadata defaultArtboard = riveAsset.EditorOnlyMetadata.Artboards[0];
|
||||
|
||||
panel.SetDimensions(new Vector2(defaultArtboard.Width, defaultArtboard.Height));
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure we have an EventSystem in the scene so that the RivePanel can receive input events
|
||||
EnsureEventSystemExists();
|
||||
|
||||
// Collapse all operations into a single undo step
|
||||
Undo.CollapseUndoOperations(undoGroupIndex);
|
||||
}
|
||||
|
||||
private static DragAndDropVisualMode HandleHierarchyDrop(GameObject parentObject, bool perform)
|
||||
{
|
||||
if (!ValidateRiveAssetDrag())
|
||||
{
|
||||
// If we don't do this, it breaks regular drag and drop in the hierarchy
|
||||
// e.g. dragging a game object into another game object stops working
|
||||
return DragAndDropVisualMode.None;
|
||||
}
|
||||
|
||||
if (perform)
|
||||
{
|
||||
Asset riveAsset = DragAndDrop.objectReferences[0] as Asset;
|
||||
|
||||
if (riveAsset == null)
|
||||
return DragAndDropVisualMode.Rejected;
|
||||
|
||||
Transform parentTransform = parentObject != null ? parentObject.transform : null;
|
||||
HandleAssetDrop(riveAsset, parentTransform);
|
||||
}
|
||||
|
||||
return DragAndDropVisualMode.Move;
|
||||
}
|
||||
|
||||
#if UNITY_6000_3_OR_NEWER
|
||||
private static DragAndDropVisualMode OnHierarchyDropV2(EntityId dropTargetEntityId, HierarchyDropFlags dropMode, Transform parentForDraggedObjects, bool perform)
|
||||
{
|
||||
GameObject parentObject = EditorUtility.EntityIdToObject(dropTargetEntityId) as GameObject;
|
||||
return HandleHierarchyDrop(parentObject, perform);
|
||||
}
|
||||
#else
|
||||
private static DragAndDropVisualMode OnHierarchyDrop(int dropTargetInstanceID, HierarchyDropFlags dropMode, Transform parentForDraggedObjects, bool perform)
|
||||
{
|
||||
GameObject parentObject = EditorUtility.InstanceIDToObject(dropTargetInstanceID) as GameObject;
|
||||
return HandleHierarchyDrop(parentObject, perform);
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||