fixes
This commit is contained in:
parent
cf04700131
commit
11fd1a3d92
|
@ -34,7 +34,7 @@ MonoBehaviour:
|
|||
m_RedirectLimit: -1
|
||||
m_RetryCount: 0
|
||||
m_BuildPath:
|
||||
m_Id: fd0de07147c0109478e6cb666e90284c
|
||||
m_Id: 1f1a5a5155e1efb498c33d1ed4470fe1
|
||||
m_LoadPath:
|
||||
m_Id: 15818468a44cd934bae26a84ac71614e
|
||||
m_BundleMode: 0
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 580aaf7be17a85043b39c4c310b3babb
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7ecd7a01581a6dc49aa5d5fbe7236355
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 67807d7117c014248a783f35edd56b98
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3cd4091c0c6ad424e983eb5acc29e538
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,958 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1765830813508049662
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8856413702514468457}
|
||||
- component: {fileID: 4700296453286755723}
|
||||
- component: {fileID: 3248520872998588128}
|
||||
m_Layer: 5
|
||||
m_Name: Animation Set (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8856413702514468457
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1765830813508049662}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 5505614826358703476}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 5, y: -40}
|
||||
m_SizeDelta: {x: 115, y: 30}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!222 &4700296453286755723
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1765830813508049662}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3248520872998588128
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1765830813508049662}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: Animation Set
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 16
|
||||
m_fontSizeBase: 16
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &3640181289321003647
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8452424341521817227}
|
||||
- component: {fileID: 5330899381886869628}
|
||||
- component: {fileID: 5457885279995982788}
|
||||
m_Layer: 5
|
||||
m_Name: Animation (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8452424341521817227
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3640181289321003647}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 5505614826358703476}
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 5, y: -75}
|
||||
m_SizeDelta: {x: 115, y: 30}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!222 &5330899381886869628
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3640181289321003647}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &5457885279995982788
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3640181289321003647}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: Animation
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 16
|
||||
m_fontSizeBase: 16
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &3889235733019498718
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4949754874972476076}
|
||||
- component: {fileID: 631154957809884473}
|
||||
- component: {fileID: 6845320821331944709}
|
||||
m_Layer: 5
|
||||
m_Name: Costume (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4949754874972476076
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3889235733019498718}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 5505614826358703476}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 5, y: -5}
|
||||
m_SizeDelta: {x: 115, y: 30}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!222 &631154957809884473
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3889235733019498718}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &6845320821331944709
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3889235733019498718}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: Costume
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 16
|
||||
m_fontSizeBase: 16
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1001 &4313560975093351211
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 5505614826358703476}
|
||||
m_Modifications:
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: -125
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 30
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 57.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -40
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: NextKey
|
||||
value: 119
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: PreviousKey
|
||||
value: 113
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: OnValueChangedEvent.m_PersistentCalls.m_Calls.Array.size
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: OnValueChangedEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Target
|
||||
value:
|
||||
objectReference: {fileID: 4123562979703858423}
|
||||
- target: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: OnValueChangedEvent.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: OnValueChangedEvent.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
|
||||
value: SelectAnimationSet
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: OnValueChangedEvent.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
|
||||
value: CharacterPanel, DanMachi
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: OnValueChangedEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
|
||||
value: UnityEngine.Object, UnityEngine
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7237709411222412520, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: ExtendedDropdown
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
--- !u!114 &6440571429875150807 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
m_PrefabInstance: {fileID: 4313560975093351211}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 588358108868b3e4a9c5d0771c66dbd3, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1001 &6881671304399521498
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1434189861388518318, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -15.000023
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2973369283140423270, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Character Panel
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2973369283140423271, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2973369283140423271, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2973369283140423271, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2973369283140423271, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2973369283140423271, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2973369283140423271, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2973369283140423271, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2973369283140423271, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 300
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2973369283140423271, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 180.2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2973369283140423271, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2973369283140423271, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2973369283140423271, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2973369283140423271, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2973369283140423271, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2973369283140423271, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2973369283140423271, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2973369283140423271, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 412.08978
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2973369283140423271, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -262.1245
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2973369283140423271, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2973369283140423271, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2973369283140423271, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2973369284565770919, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_text
|
||||
value: Selected Character
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4878202427174256853, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -15.000023
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
--- !u!1 &8557714551378741436 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 2973369283140423270, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
m_PrefabInstance: {fileID: 6881671304399521498}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!224 &5505614826358703476 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 1434189861388518318, guid: 2041614864914994c8e1015b2f0a4d51, type: 3}
|
||||
m_PrefabInstance: {fileID: 6881671304399521498}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &4123562979703858423
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8557714551378741436}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 26a550c137eb4ff42aebcf10b11d5626, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
AnimationSetDropdown: {fileID: 6440571429875150807}
|
||||
AnimationDropdown: {fileID: 1501907663837775939}
|
||||
CostumeDropdown: {fileID: 1727748390431090154}
|
||||
--- !u!1001 &8450841200242739478
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 5505614826358703476}
|
||||
m_Modifications:
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: -125
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 30
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 57.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -4.9999847
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: NextKey
|
||||
value: 119
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: PreviousKey
|
||||
value: 113
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: OnValueChangedEvent.m_PersistentCalls.m_Calls.Array.size
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: OnValueChangedEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Target
|
||||
value:
|
||||
objectReference: {fileID: 4123562979703858423}
|
||||
- target: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: OnValueChangedEvent.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: OnValueChangedEvent.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
|
||||
value: SelectCostume
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: OnValueChangedEvent.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
|
||||
value: CharacterPanel, DanMachi
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: OnValueChangedEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
|
||||
value: UnityEngine.Object, UnityEngine
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7237709411222412520, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: ' CostumeDropdown'
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
--- !u!114 &1727748390431090154 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
m_PrefabInstance: {fileID: 8450841200242739478}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 588358108868b3e4a9c5d0771c66dbd3, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1001 &8532773584503661759
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 5505614826358703476}
|
||||
m_Modifications:
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 4
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: -125
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 30
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 57.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -75
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5912534066895396757, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: NextKey
|
||||
value: 115
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: PreviousKey
|
||||
value: 97
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: OnValueChangedEvent.m_PersistentCalls.m_Calls.Array.size
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: OnValueChangedEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Target
|
||||
value:
|
||||
objectReference: {fileID: 4123562979703858423}
|
||||
- target: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: OnValueChangedEvent.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: OnValueChangedEvent.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
|
||||
value: SelectAnimation
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: OnValueChangedEvent.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
|
||||
value: CharacterPanel, DanMachi
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: OnValueChangedEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
|
||||
value: UnityEngine.Object, UnityEngine
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7237709411222412520, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: ExtendedDropdown (1)
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
--- !u!114 &1501907663837775939 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 7114941176805960956, guid: 2185289df8ca10a419011f938cbcde14, type: 3}
|
||||
m_PrefabInstance: {fileID: 8532773584503661759}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 588358108868b3e4a9c5d0771c66dbd3, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 37465906e6548634b901574c82f70860
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 226a358110a00f44a89a4e375c5264a9
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1b0411d6227b0454790d4dfb3da91abd
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,20 @@
|
|||
[System.Serializable]
|
||||
public class CharacterAsset : AssetSpawnData
|
||||
{
|
||||
public string Category;
|
||||
public string Id;
|
||||
public string Costume;
|
||||
public string AssetName;
|
||||
|
||||
public CharacterAsset(string assetName, string filePath)
|
||||
{
|
||||
var split = assetName.Split(new char[] { '_', '.' });
|
||||
|
||||
AssetType = AssetTypes.Character;
|
||||
Category = split[1];
|
||||
Id = split[2];
|
||||
Costume = split[3];
|
||||
AssetName = assetName;
|
||||
FilePath = filePath;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 60ff7794a9208e347a9dccb94be34c2c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0ff11836c100a9c4b9ec7f5be413dae0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,265 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
public class DanMachiCharacterContainer : DanMachiObjectContainer, IAnimated
|
||||
{
|
||||
public CharacterAsset Data;
|
||||
public string AnimationSet;
|
||||
public string Animation;
|
||||
|
||||
public MorphPanel MorphPanel;
|
||||
public CharacterPanel CharacterPanel;
|
||||
public List<AnimationClip> Animations;
|
||||
private Animator _animator;
|
||||
private AnimatorOverrideController _animatorController;
|
||||
private Dictionary<HumanBodyBones, Transform> _humanBones = new Dictionary<HumanBodyBones, Transform>();
|
||||
|
||||
public override void Select()
|
||||
{
|
||||
if(MorphPanel != null)
|
||||
{
|
||||
MorphPanel.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Deselect()
|
||||
{
|
||||
if (MorphPanel != null)
|
||||
{
|
||||
MorphPanel.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
public void Build(CharacterAsset model)
|
||||
{
|
||||
Data = model;
|
||||
var characterAsset = AssetBundle.LoadFromFile(model.FilePath);
|
||||
var animationSets = DanMachiAssetLibrary.Instance.Animations.Where(a => a.Category == model.Category && a.Id == model.Id);
|
||||
|
||||
foreach (var go in characterAsset.LoadAllAssets<GameObject>())
|
||||
{
|
||||
Instantiate(go, transform);
|
||||
}
|
||||
characterAsset.Unload(false);
|
||||
|
||||
SetDefaultMaterials(transform);
|
||||
|
||||
Init();
|
||||
|
||||
var defaultAnimSet = animationSets.FirstOrDefault(a => a.Costume == "common");
|
||||
LoadAnimationSet(defaultAnimSet);
|
||||
}
|
||||
|
||||
public void Init()
|
||||
{
|
||||
_animator = GetComponentInChildren<Animator>();
|
||||
_animator.applyRootMotion = false;
|
||||
_animator.runtimeAnimatorController = _animatorController = Instantiate(SharedResources.Instance.GenericAnimatorController);
|
||||
CreateMorphPanel();
|
||||
CreateCharacterPanel();
|
||||
SetBones();
|
||||
}
|
||||
|
||||
public void LoadAnimationSet(CharacterAsset animationSet)
|
||||
{
|
||||
if (animationSet != null)
|
||||
{
|
||||
AnimationSet = animationSet.Costume;
|
||||
Animation = "";
|
||||
var animationAsset = AssetBundle.LoadFromFile(animationSet.FilePath);
|
||||
Animations = animationAsset.LoadAllAssets<AnimationClip>().ToList();
|
||||
animationAsset.Unload(false);
|
||||
}
|
||||
}
|
||||
|
||||
public void PlayAnimation(string clipName)
|
||||
{
|
||||
var anim = Animations.FirstOrDefault(a=>a.name == clipName);
|
||||
PlayAnimation(anim);
|
||||
}
|
||||
|
||||
public void PlayAnimation(AnimationClip anim)
|
||||
{
|
||||
if(anim == null)
|
||||
{
|
||||
Animation = "";
|
||||
_animator.enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Animation = anim.name;
|
||||
_animator.enabled = true;
|
||||
_animatorController["Anim"] = anim;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetDefaultMaterials(Transform t)
|
||||
{
|
||||
List<Material> materials = new List<Material>();
|
||||
foreach (var renderer in t.GetComponentsInChildren<Renderer>())
|
||||
{
|
||||
foreach (var material in renderer.sharedMaterials)
|
||||
{
|
||||
if (materials.Contains(material)) continue;
|
||||
materials.Add(material);
|
||||
material.shader = Shader.Find("UniversalStandard");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SetBones()
|
||||
{
|
||||
var humanBones = new Dictionary<HumanBodyBones, Transform>();
|
||||
var allBones = _animator.transform.GetComponentsInChildren<Transform>().ToDictionary(b=>b.name, b=>b);
|
||||
humanBones.Add(HumanBodyBones.Hips, TryGet(allBones,"Hips"));
|
||||
humanBones.Add(HumanBodyBones.Spine, TryGet(allBones,"Spine"));
|
||||
humanBones.Add(HumanBodyBones.RightUpperLeg, TryGet(allBones,"RightUpLeg"));
|
||||
humanBones.Add(HumanBodyBones.RightLowerLeg, TryGet(allBones,"RightLeg"));
|
||||
humanBones.Add(HumanBodyBones.RightFoot, TryGet(allBones,"RightFoot"));
|
||||
humanBones.Add(HumanBodyBones.RightToes, TryGet(allBones,"RightToeBase"));
|
||||
humanBones.Add(HumanBodyBones.LeftUpperLeg, TryGet(allBones,"LeftUpLeg"));
|
||||
humanBones.Add(HumanBodyBones.LeftLowerLeg, TryGet(allBones,"LeftLeg"));
|
||||
humanBones.Add(HumanBodyBones.LeftFoot, TryGet(allBones,"LeftFoot"));
|
||||
humanBones.Add(HumanBodyBones.LeftToes, TryGet(allBones,"LeftToeBase"));
|
||||
humanBones.Add(HumanBodyBones.Chest, TryGet(allBones,"Spine1"));
|
||||
humanBones.Add(HumanBodyBones.UpperChest, TryGet(allBones,"Spine2"));
|
||||
humanBones.Add(HumanBodyBones.Neck, TryGet(allBones,"Neck"));
|
||||
humanBones.Add(HumanBodyBones.Head, TryGet(allBones,"Head"));
|
||||
humanBones.Add(HumanBodyBones.RightShoulder, TryGet(allBones,"RightShoulder"));
|
||||
humanBones.Add(HumanBodyBones.RightUpperArm, TryGet(allBones,"RightArm"));
|
||||
humanBones.Add(HumanBodyBones.RightLowerArm, TryGet(allBones,"RightForeArm"));
|
||||
humanBones.Add(HumanBodyBones.RightHand, TryGet(allBones,"RightHand"));
|
||||
humanBones.Add(HumanBodyBones.RightIndexProximal, TryGet(allBones,"RightHandIndex1"));
|
||||
humanBones.Add(HumanBodyBones.RightIndexIntermediate, TryGet(allBones,"RightHandIndex2"));
|
||||
humanBones.Add(HumanBodyBones.RightMiddleProximal, TryGet(allBones,"RightHandMiddle1"));
|
||||
humanBones.Add(HumanBodyBones.RightMiddleIntermediate, TryGet(allBones,"RightHandMiddle2"));
|
||||
humanBones.Add(HumanBodyBones.RightRingProximal, TryGet(allBones,"RightHandRing1"));
|
||||
humanBones.Add(HumanBodyBones.RightRingIntermediate, TryGet(allBones,"RightHandRing2"));
|
||||
humanBones.Add(HumanBodyBones.RightLittleProximal, TryGet(allBones,"RightHandPinky1"));
|
||||
humanBones.Add(HumanBodyBones.RightLittleIntermediate, TryGet(allBones,"RightHandPinky2"));
|
||||
humanBones.Add(HumanBodyBones.RightThumbProximal, TryGet(allBones,"RightHandThumb1"));
|
||||
humanBones.Add(HumanBodyBones.RightThumbIntermediate, TryGet(allBones,"RightHandThumb2"));
|
||||
humanBones.Add(HumanBodyBones.LeftShoulder, TryGet(allBones,"LeftShoulder"));
|
||||
humanBones.Add(HumanBodyBones.LeftUpperArm, TryGet(allBones,"LeftArm"));
|
||||
humanBones.Add(HumanBodyBones.LeftLowerArm, TryGet(allBones,"LeftForeArm"));
|
||||
humanBones.Add(HumanBodyBones.LeftHand, TryGet(allBones,"LeftHand"));
|
||||
humanBones.Add(HumanBodyBones.LeftIndexProximal, TryGet(allBones,"LeftHandIndex1"));
|
||||
humanBones.Add(HumanBodyBones.LeftIndexIntermediate, TryGet(allBones,"LeftHandIndex2"));
|
||||
humanBones.Add(HumanBodyBones.LeftMiddleProximal, TryGet(allBones,"LeftHandMiddle1"));
|
||||
humanBones.Add(HumanBodyBones.LeftMiddleIntermediate, TryGet(allBones,"LeftHandMiddle2"));
|
||||
humanBones.Add(HumanBodyBones.LeftRingProximal, TryGet(allBones,"LeftHandRing1"));
|
||||
humanBones.Add(HumanBodyBones.LeftRingIntermediate, TryGet(allBones,"LeftHandRing2"));
|
||||
humanBones.Add(HumanBodyBones.LeftLittleProximal, TryGet(allBones,"LeftHandPinky1"));
|
||||
humanBones.Add(HumanBodyBones.LeftLittleIntermediate, TryGet(allBones,"LeftHandPinky2"));
|
||||
humanBones.Add(HumanBodyBones.LeftThumbProximal, TryGet(allBones,"LeftHandThumb1"));
|
||||
humanBones.Add(HumanBodyBones.LeftThumbIntermediate, TryGet(allBones,"LeftHandThumb2"));
|
||||
foreach(var bone in humanBones)
|
||||
{
|
||||
if(bone.Value != null)
|
||||
{
|
||||
var tags = new List<SerializableBone.BoneTags>() { SerializableBone.BoneTags.Humanoid };
|
||||
if (bone.Value.name.Contains("Left"))
|
||||
{
|
||||
tags.Add(SerializableBone.BoneTags.Left);
|
||||
}
|
||||
else if (bone.Value.name.Contains("Right"))
|
||||
{
|
||||
tags.Add(SerializableBone.BoneTags.Right);
|
||||
}
|
||||
if((bone.Key >= HumanBodyBones.LeftThumbProximal && bone.Key <= HumanBodyBones.LeftLittleDistal)
|
||||
|| (bone.Key >= HumanBodyBones.RightThumbProximal && bone.Key <= HumanBodyBones.RightLittleDistal))
|
||||
{
|
||||
tags.Add(SerializableBone.BoneTags.Finger);
|
||||
}
|
||||
UIHandle.CreateAsChild<UIHandleBone>(bone.Value).Init(this, tags);
|
||||
}
|
||||
}
|
||||
foreach(var bone in allBones.Values.Except(humanBones.Values))
|
||||
{
|
||||
var tags = new List<SerializableBone.BoneTags>();
|
||||
if (bone.GetComponent<Unity.Animations.SpringBones.SpringBone>() != null)
|
||||
{
|
||||
tags.Add(SerializableBone.BoneTags.Dynamic);
|
||||
}
|
||||
UIHandle.CreateAsChild<UIHandleBone>(bone).Init(this, tags);
|
||||
}
|
||||
|
||||
_humanBones = humanBones;
|
||||
}
|
||||
|
||||
public T TryGet<T>(Dictionary<string, T> dict, string key)
|
||||
{
|
||||
if (dict.ContainsKey(key))
|
||||
{
|
||||
return dict[key];
|
||||
}
|
||||
return default(T);
|
||||
}
|
||||
|
||||
public void CreateMorphPanel()
|
||||
{
|
||||
if(MorphPanel != null)
|
||||
{
|
||||
Destroy(MorphPanel.gameObject);
|
||||
}
|
||||
|
||||
var morphRenderers = new Dictionary<SkinnedMeshRenderer, List<MorphHelper>>();
|
||||
foreach (var rend in gameObject.GetComponentsInChildren<SkinnedMeshRenderer>())
|
||||
{
|
||||
if(rend.sharedMesh.blendShapeCount > 0)
|
||||
{
|
||||
morphRenderers.Add(rend, new List<MorphHelper>());
|
||||
}
|
||||
}
|
||||
|
||||
if (morphRenderers.Count == 0) return;
|
||||
|
||||
MorphPanel = MorphPanel.Create(morphRenderers.Select(mr=>mr.Key.sharedMesh.name).ToList());
|
||||
MorphPanel.name = $"Chr_{Data.Id} Morphs";
|
||||
|
||||
foreach(var rend in morphRenderers)
|
||||
{
|
||||
var mesh = rend.Key.sharedMesh;
|
||||
for(int i = 0; i < mesh.blendShapeCount; i++)
|
||||
{
|
||||
MorphPanel.CreateMorph(mesh.name, this, rend.Key, i, mesh.GetBlendShapeName(i).Replace("blendShape1.",""));
|
||||
}
|
||||
}
|
||||
|
||||
Morphs = morphRenderers;
|
||||
DanMachiModelViewerInterface.Instance.SelectedObjectToolbar.AttachToThis(MorphPanel.GetComponent<UIElementDragger>());
|
||||
}
|
||||
|
||||
public void CreateCharacterPanel()
|
||||
{
|
||||
CharacterPanel = CharacterPanel.Create(this);
|
||||
CharacterPanel.name = $"Chr_{Data.Id} Settings";
|
||||
DanMachiModelViewerInterface.Instance.SelectedObjectToolbar.AttachToThis(CharacterPanel.GetComponent<UIElementDragger>());
|
||||
}
|
||||
|
||||
public override Vector3 GetCenter()
|
||||
{
|
||||
if (_humanBones.ContainsKey(HumanBodyBones.Hips))
|
||||
{
|
||||
return _humanBones[HumanBodyBones.Hips].position;
|
||||
}
|
||||
return base.GetCenter();
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
if (_applicationQuitting) return;
|
||||
if(MorphPanel != null)
|
||||
{
|
||||
Destroy(MorphPanel.gameObject);
|
||||
}
|
||||
Destroy(CharacterPanel.gameObject);
|
||||
base.OnDestroy();
|
||||
}
|
||||
|
||||
public Animator GetAnimator()
|
||||
{
|
||||
return _animator;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d65f01410b3faa44fa172126f630f0c4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,42 @@
|
|||
public class DanMachiObjectContainer : ObjectContainer
|
||||
{
|
||||
protected static DanMachiModelViewerMain Main => DanMachiModelViewerMain.Instance;
|
||||
|
||||
protected override void Start()
|
||||
{
|
||||
if (DoNotSave) return;
|
||||
|
||||
if(Frames.Count == 0)
|
||||
{
|
||||
SetKeyframe();
|
||||
}
|
||||
|
||||
DanMachiModelViewerMain.RegisterObject(this);
|
||||
var selector = UITimelineObjectEntry.Create(this);
|
||||
InstantiatedObjects.Add(selector.gameObject);
|
||||
|
||||
ModelViewerMain.GetInstance<DanMachiModelViewerMain>().SelectObject(this);
|
||||
}
|
||||
|
||||
public override void Select()
|
||||
{
|
||||
}
|
||||
|
||||
public override void Deselect()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
if(_applicationQuitting) return;
|
||||
|
||||
if (Main.SelectedObject == this)
|
||||
{
|
||||
Main.SelectObject(null);
|
||||
}
|
||||
|
||||
ModelViewerMain.UnregisterObject(this);
|
||||
|
||||
base.OnDestroy();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6ce5c34b04160214b935e3dcefed9ffc
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "DanMachi",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:1f135e4ce2898524aa1e81c5cd7f1242",
|
||||
"GUID:6055be8ebefd69e48b49212b09b47b2f",
|
||||
"GUID:24ad1c085c49dc34dbe16c3d92c6f299",
|
||||
"GUID:cd3f2222600b41b4ead10f1843a97448"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 41e00cea93be1f14e8994b9c2e214ad2
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,128 @@
|
|||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
public class DanMachiAssetLibrary : AssetLibrary
|
||||
{
|
||||
public static DanMachiAssetLibrary Instance => GetInstance<DanMachiAssetLibrary>();
|
||||
|
||||
private List<string> assets = new List<string>();
|
||||
private Dictionary<string, string> hashDirectories = new Dictionary<string, string>();
|
||||
private Dictionary<string, string> hashAssets = new Dictionary<string, string>();
|
||||
private Dictionary<string, string> assetHashes = new Dictionary<string, string>();
|
||||
|
||||
public List<string> CharacterAssets = new List<string>();
|
||||
public List<string> AnimationAssets = new List<string>();
|
||||
public List<CharacterAsset> Characters = new List<CharacterAsset>();
|
||||
public List<CharacterAsset> Animations = new List<CharacterAsset>();
|
||||
|
||||
public CharacterPanel CharacterPanel;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_mainInstance = this;
|
||||
}
|
||||
|
||||
IEnumerator Start()
|
||||
{
|
||||
//string assetListUrl = "https://jp-prd-cdn-danmachi-danchro.akamaized.net/resources/assetbundles/catalogs/Android_En/5c8b4dd0ca65f2751ba243ff773db969/catalog_0.0.0.json";
|
||||
//yield return Downloader.DownloadText(assetListUrl, str =>
|
||||
//{
|
||||
// ParseList(str);
|
||||
//});
|
||||
|
||||
string catalogPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "Low\\aiming\\DanChro\\com.unity.addressables\\catalog_0.0.0.json";
|
||||
string localFilesPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "Low\\Unity\\aiming_DanChro\\";
|
||||
|
||||
yield return LoadAddressableCatalog(catalogPath);
|
||||
|
||||
//foreach (var dir in Directory.GetDirectories(localFilesPath))
|
||||
//{
|
||||
// var fullDir = Directory.GetDirectories(dir)[0];
|
||||
// var hash = fullDir.Split('\\').Last();
|
||||
// hashAssets[hash] = "";
|
||||
// hashDirectories[hash] = fullDir;
|
||||
//}
|
||||
|
||||
foreach(var entry in GetAddressableKeys())
|
||||
{
|
||||
if (entry.StartsWith("chara_") && entry.Contains("assets_all") && !entry.Contains("facial") && !entry.Contains("camanim"))
|
||||
{
|
||||
if (entry.Contains("_anim_"))
|
||||
{
|
||||
AnimationAssets.Add(entry);
|
||||
var chara = new CharacterAsset(entry, localFilesPath + GetResourcePath(entry));
|
||||
Animations.Add(chara);
|
||||
}
|
||||
else
|
||||
{
|
||||
CharacterAssets.Add(entry);
|
||||
var chara = new CharacterAsset(entry, localFilesPath + GetResourcePath(entry));
|
||||
Characters.Add(chara);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//ParseList(File.ReadAllText(catalogPath));
|
||||
|
||||
//foreach (var asset in CharacterAssets)
|
||||
//{
|
||||
// //string assetPath = "https://jp-prd-cdn-danmachi-danchro.akamaized.net/resources/assetbundles/assets/Android_En/" + asset;
|
||||
// //string outPath = Application.dataPath + "/../GameAssets/" + asset;
|
||||
// //if (File.Exists(outPath)) continue;
|
||||
// //yield return Downloader.DownloadAsset(assetPath, outPath, null);
|
||||
// var split = asset.Split(new char[] { '_', '.' });
|
||||
// var hash = split[split.Length - 2];
|
||||
// if (hashAssets.ContainsKey(hash))
|
||||
// {
|
||||
// hashAssets[hash] = asset;
|
||||
// assetHashes[asset] = hash;
|
||||
// }
|
||||
|
||||
// var filePath = Path.Combine(hashDirectories[hash], "__data");
|
||||
// var chara = new CharacterAsset(asset, filePath);
|
||||
// Characters.Add(chara);
|
||||
//}
|
||||
|
||||
DanMachiModelViewerInterface.Instance.CharacterSelection.SetData(Characters);
|
||||
|
||||
yield break;
|
||||
}
|
||||
|
||||
//public void ParseList(string assetList)
|
||||
//{
|
||||
// var json = JObject.Parse(assetList);
|
||||
// foreach (var entry in json["m_InternalIds"])
|
||||
// {
|
||||
// var fileName = entry.ToString().Split(new char[]{'\\', '/'}).Last();
|
||||
// assets.Add(fileName);
|
||||
// if (fileName.StartsWith("chara_") && fileName.Contains("assets_all") && !fileName.Contains("anim") && !fileName.Contains("facial"))
|
||||
// {
|
||||
// CharacterAssets.Add(fileName);
|
||||
// }
|
||||
// if (fileName.EndsWith(".anim"))
|
||||
// {
|
||||
// Animations.Add(fileName);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
public string GetCharacter(string group, string id, string costume)
|
||||
{
|
||||
return CharacterAssets.First(c => c.StartsWith($"chara_{group}_{id}_{costume}"));
|
||||
}
|
||||
|
||||
public string GetAssetPathByName(string name)
|
||||
{
|
||||
if (assetHashes.ContainsKey(name))
|
||||
{
|
||||
var assetHash = assetHashes[name];
|
||||
var fullPath = Path.Combine(hashDirectories[assetHash], "__data");
|
||||
return fullPath;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b12f661a77fd03f499c6aa577cf3d546
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
public class DanMachiModelBuilder : ModelBuilder
|
||||
{
|
||||
public static DanMachiModelBuilder Instance => GetInstance<DanMachiModelBuilder>();
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_mainInstance = this;
|
||||
}
|
||||
|
||||
public override IEnumerator SpawnAsset(Enum assetType, string assetPath, Action<ObjectContainer> callback = null)
|
||||
{
|
||||
switch (assetType)
|
||||
{
|
||||
case AssetTypes.Unknown:
|
||||
throw new NotImplementedException();
|
||||
case AssetTypes.Character:
|
||||
var asset = DanMachiAssetLibrary.Instance.Characters.First(c=>c.AssetName == assetPath);
|
||||
callback?.Invoke(SpawnCharacter(asset));
|
||||
break;
|
||||
default:
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
|
||||
public DanMachiCharacterContainer SpawnCharacter(CharacterAsset asset)
|
||||
{
|
||||
var container = ObjectContainer.Create<DanMachiCharacterContainer>("Character");
|
||||
var handle = UIHandle.CreateAsChild<UIHandleMain>(container.transform).Init(container);
|
||||
container.Build(asset);
|
||||
container.PlayAnimation(container.Animations[0]);
|
||||
return container;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 39edab08a0610954bab2fac72308fcfa
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,15 @@
|
|||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
|
||||
public class DanMachiModelViewerInterface : ModelViewerInterface
|
||||
{
|
||||
public static DanMachiModelViewerInterface Instance => GetInstance<DanMachiModelViewerInterface>();
|
||||
|
||||
public CharacterDropdown CharacterSelection;
|
||||
public UIToolbar SelectedObjectToolbar;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_mainInstance = this;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a67ad85d97739684da41f7a86132d210
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,94 @@
|
|||
using System.Collections;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
[RequireComponent(typeof(DanMachiAssetLibrary), typeof(DanMachiModelBuilder), typeof(DanMachiModelViewerInterface))]
|
||||
public class DanMachiModelViewerMain : ModelViewerMain
|
||||
{
|
||||
public static DanMachiModelViewerMain Instance => GetInstance<DanMachiModelViewerMain>();
|
||||
|
||||
protected DanMachiAssetLibrary _assets => DanMachiAssetLibrary.Instance;
|
||||
protected DanMachiModelBuilder _modelBuilder => DanMachiModelBuilder.Instance;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_backupTimers = _backupTimes.ToArray();
|
||||
CurrentScene = SceneContainer.Create<DanMachiSceneContainer>(this);
|
||||
}
|
||||
|
||||
private IEnumerator Start()
|
||||
{
|
||||
Application.targetFrameRate = 30;
|
||||
Error.Log(Color.green, "Viewer version: " + Application.version);
|
||||
|
||||
float warningTimer = 0;
|
||||
while (DanMachiAssetLibrary.Instance == null || DanMachiModelBuilder.Instance == null || DanMachiModelViewerInterface.Instance == null || SharedResources.Instance == null)
|
||||
{
|
||||
warningTimer += Time.deltaTime;
|
||||
if(warningTimer > 2)
|
||||
{
|
||||
warningTimer = 0;
|
||||
string report = $"AssetLibrary: {DanMachiAssetLibrary.Instance != null}\nModelBuilder: {DanMachiModelBuilder.Instance != null}\nInterface: {DanMachiModelViewerInterface.Instance != null}\nResources: {SharedResources.Instance != null}";
|
||||
Error.Log(report, Color.red);
|
||||
}
|
||||
yield return 0;
|
||||
}
|
||||
|
||||
if (!MainCameraOrbit.Frames.Any())
|
||||
MainCameraOrbit.SetDefaultFrame();
|
||||
|
||||
_mainInstance = this;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
//AutoSaveUpdate();
|
||||
}
|
||||
|
||||
public static void RegisterObject(DanMachiObjectContainer container)
|
||||
{
|
||||
Instance.CurrentScene.AllObjects.Add(container);
|
||||
}
|
||||
|
||||
public static void UnregisterObject(DanMachiObjectContainer container)
|
||||
{
|
||||
Instance.CurrentScene.AllObjects.Remove(container);
|
||||
}
|
||||
|
||||
public static void DisposeOf(GameObject go)
|
||||
{
|
||||
if (go == null) return;
|
||||
var rends = go.GetComponentsInChildren<Renderer>();
|
||||
foreach (var rend in rends)
|
||||
{
|
||||
for (int i = rend.materials.Length - 1; i >= 0; i--)
|
||||
{
|
||||
Destroy(rend.materials[i]);
|
||||
}
|
||||
}
|
||||
Destroy(go);
|
||||
UnityEngine.Resources.UnloadUnusedAssets();
|
||||
System.GC.Collect();
|
||||
}
|
||||
|
||||
public IEnumerator LoadScene(DanMachiSceneSerializable bc)
|
||||
{
|
||||
EmptyScene<DanMachiSceneContainer>();
|
||||
|
||||
foreach (var c in bc.Objects)
|
||||
{
|
||||
if (c.GUID == "cameraOrbit")
|
||||
{
|
||||
MainCameraOrbit.DeserializeFrames(c);
|
||||
}
|
||||
else
|
||||
{
|
||||
yield return _modelBuilder.SpawnSerialized(c);
|
||||
}
|
||||
}
|
||||
bc.Timeline.Deserialize(TimelineController.Instance);
|
||||
CurrentScene.Frames = bc.Frames.Select(f => new FrameContent(f)).ToList();
|
||||
yield return 0;
|
||||
TimelineController.SetCurrentFrame(TimelineController.Instance.CurrentFrame);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2600eb3d110b4b346af6009caf5c1e34
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,49 @@
|
|||
using UnityEngine;
|
||||
|
||||
public class DanMachiSceneContainer : SceneContainer
|
||||
{
|
||||
public override KeyframeData SerializeFrame()
|
||||
{
|
||||
return new KeyframeData();
|
||||
}
|
||||
|
||||
public override ObjectContainerSerializable Serialize()
|
||||
{
|
||||
return new SceneSerializable(this);
|
||||
}
|
||||
|
||||
public override void Lerp(KeyframeData frame1, KeyframeData frame2, float amount)
|
||||
{
|
||||
var frame = (frame1 as KeyframeData).Lerp(frame2, amount) as KeyframeData;
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
if (_applicationQuitting) return;
|
||||
|
||||
for (int i = AllObjects.Count - 1; i >= 0; i--)
|
||||
{
|
||||
var obj = AllObjects[i];
|
||||
if (obj.GetDataType() == DataType.Camera)
|
||||
{
|
||||
Debug.Log("Destroying cam");
|
||||
obj.Frames.Clear();
|
||||
obj.SetDefaultFrame();
|
||||
continue;
|
||||
}
|
||||
Destroy(obj.gameObject);
|
||||
}
|
||||
|
||||
base.OnDestroy();
|
||||
}
|
||||
|
||||
public override void Select()
|
||||
{
|
||||
//Settings.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
public override void Deselect()
|
||||
{
|
||||
//Settings.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c58ee12edd81a8d43a9107bc7906a17b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,6 @@
|
|||
using System;
|
||||
|
||||
[Serializable]
|
||||
public class DanMachiSceneSerializable : SceneSerializable
|
||||
{
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c04af4c8b1b74df4783e6f4815bd909f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1a18b62d9e3df7145807bbac970b0294
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,21 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unity.Animations.SpringBones
|
||||
{
|
||||
public class SpringBone : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c0f98808b73c1124db3bf2a8a8e54cf6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"name": "com.unity.animations.springbone"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: cd3f2222600b41b4ead10f1843a97448
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0149f5e055b5ff14da09775c923fa81e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,140 @@
|
|||
using TMPro;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
|
||||
public class CharacterDropdown : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private TMP_Dropdown MainDropdown;
|
||||
[SerializeField] private TMP_InputField MainLabel;
|
||||
public List<string> DropdownLabels = new List<string>() { "Character", "Costume" };
|
||||
public List<TMP_Dropdown> Dropdowns = new List<TMP_Dropdown>();
|
||||
public List<TMP_InputField> Labels = new List<TMP_InputField>();
|
||||
private bool _awake;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (_awake) return;
|
||||
_awake = true;
|
||||
Rebuild();
|
||||
}
|
||||
|
||||
private void Rebuild()
|
||||
{
|
||||
var labelParent = MainLabel.transform.parent;
|
||||
var dropdownParent = MainDropdown.transform.parent;
|
||||
|
||||
MainDropdown.ClearOptions();
|
||||
Dropdowns.Clear();
|
||||
Dropdowns.Add(MainDropdown);
|
||||
|
||||
foreach (var child in dropdownParent.GetComponentsInChildren<TMP_Dropdown>())
|
||||
{
|
||||
if (child != MainDropdown) Destroy(child);
|
||||
}
|
||||
foreach (var child in labelParent.GetComponentsInChildren<TMP_Dropdown>())
|
||||
{
|
||||
if (child != MainLabel) Destroy(child);
|
||||
}
|
||||
|
||||
MainDropdown.name = DropdownLabels[0];
|
||||
MainLabel.text = DropdownLabels[0];
|
||||
|
||||
foreach (var label in DropdownLabels.Skip(1))
|
||||
{
|
||||
var dd = Instantiate(MainDropdown, dropdownParent);
|
||||
dd.name = "dropdown_" + label;
|
||||
var ll = Instantiate(MainLabel, labelParent);
|
||||
ll.name = label + " (TMP)";
|
||||
ll.text = label;
|
||||
Dropdowns.Add(dd);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetData(List<CharacterAsset> characters)
|
||||
{
|
||||
Awake();
|
||||
SetDropdownData(0, characters.Select(c => c.Category).Distinct().ToList(), true, true);
|
||||
|
||||
UnityAction<int> groupCallback = (index) =>
|
||||
{
|
||||
if (index == 0) return;
|
||||
|
||||
var category = GetOption(0);
|
||||
SetDropdownData(1, characters.Where(c => c.Category == category).Select(c => c.Id).Distinct().ToList(), true, true);
|
||||
//SetDropdownData(2, new List<string>(), true, true);
|
||||
};
|
||||
|
||||
UnityAction<int> charaCallback = (index) =>
|
||||
{
|
||||
if (index == 0) return;
|
||||
|
||||
var category = GetOption(0);
|
||||
var id = GetOption(1);
|
||||
var costumes = characters.Where(c => c.Category == category && c.Id == id);
|
||||
var costume = costumes.FirstOrDefault(c => c.Costume == "common");
|
||||
costume ??= costumes.First();
|
||||
DanMachiModelBuilder.Instance.SpawnCharacter(costume);
|
||||
//SetDropdownData(2, characters.Where(c => c.Category == category && c.Id == id).Select(c => c.Costume).ToList(), true, true);
|
||||
};
|
||||
|
||||
//UnityAction<int> costumeCallback = (index) =>
|
||||
//{
|
||||
// var chara = DanMachiAssetLibrary.Instance.GetCharacter(GetOption(0), GetOption(1), GetOption(2));
|
||||
// StartCoroutine(DanMachiModelBuilder.Instance.SpawnAsset(AssetTypes.Character, chara));
|
||||
//};
|
||||
|
||||
SetCallbacks(new List<UnityAction<int>>()
|
||||
{
|
||||
groupCallback,
|
||||
charaCallback
|
||||
});
|
||||
}
|
||||
|
||||
public void SetCallbacks(List<UnityAction<int>> callbacks)
|
||||
{
|
||||
if (callbacks.Count < Dropdowns.Count)
|
||||
{
|
||||
Error.Log(Color.red, $"Incorrect number of callbacks for dropdowns. Got {callbacks.Count}, required {Dropdowns.Count}");
|
||||
}
|
||||
|
||||
for (int i = 0; i < Dropdowns.Count; i++)
|
||||
{
|
||||
Dropdowns[i].onValueChanged.RemoveAllListeners();
|
||||
Dropdowns[i].onValueChanged.AddListener(callbacks[i]);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnDropdownSelected(int selection)
|
||||
{
|
||||
if (selection == 0)
|
||||
{
|
||||
Debug.LogError("Delete Current");
|
||||
}
|
||||
StartCoroutine(ModelBuilder.GetInstance().SpawnAsset(AssetTypes.Character, MainDropdown.options[selection].text));
|
||||
}
|
||||
|
||||
public void SetDropdownData(string label, List<string> options, bool nullValue = false, bool sortValues = false)
|
||||
{
|
||||
var depth = DropdownLabels.IndexOf(label);
|
||||
SetDropdownData(depth, options, nullValue, sortValues);
|
||||
}
|
||||
|
||||
public string GetOption(int depth)
|
||||
{
|
||||
if (Dropdowns[depth].value == 0) return null;
|
||||
return Dropdowns[depth].options[Dropdowns[depth].value].text;
|
||||
}
|
||||
|
||||
public void SetDropdownData(int depth, List<string> options, bool nullValue = false, bool sortValues = false)
|
||||
{
|
||||
if (depth >= Dropdowns.Count || depth < 0)
|
||||
{
|
||||
Error.Log(Color.red, $"Dropdown {depth} out of range");
|
||||
return;
|
||||
}
|
||||
ModelViewerInterface.SetDropdownData(Dropdowns[depth], options, nullValue, sortValues);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: eaaf892cb6c1a98408a9e1e8e75c5b79
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,63 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
public class CharacterPanel : MonoBehaviour
|
||||
{
|
||||
public ExtendedDropdown AnimationSetDropdown;
|
||||
public ExtendedDropdown AnimationDropdown;
|
||||
public ExtendedDropdown CostumeDropdown;
|
||||
private DanMachiCharacterContainer _selectedChara;
|
||||
|
||||
public static CharacterPanel Create(DanMachiCharacterContainer chara)
|
||||
{
|
||||
var panel = Instantiate(DanMachiAssetLibrary.Instance.CharacterPanel, ModelViewerInterface.GetInstance().DynamicPanels.transform);
|
||||
panel.Init(chara);
|
||||
return panel;
|
||||
}
|
||||
|
||||
public void Init(DanMachiCharacterContainer chara)
|
||||
{
|
||||
_selectedChara = chara;
|
||||
CostumeDropdown.SetOptions(DanMachiAssetLibrary.Instance.Characters.Where(a => a.Category == chara.Data.Category && a.Id == chara.Data.Id).Select(a => a.Costume).ToList());
|
||||
CostumeDropdown.SetValueWithoutNotify(chara.Data.Costume);
|
||||
AnimationSetDropdown.SetOptions(DanMachiAssetLibrary.Instance.Animations.Where(a => a.Category == chara.Data.Category && a.Id == chara.Data.Id).Select(a => a.Costume).ToList(), true);
|
||||
}
|
||||
|
||||
public void SelectCostume(int value)
|
||||
{
|
||||
var pose = _selectedChara.SerializeFrame();
|
||||
var data = _selectedChara.Data;
|
||||
var newData = DanMachiAssetLibrary.Instance.Characters.First(c => c.Category == data.Category && c.Id == data.Id && c.Costume == CostumeDropdown.options[value].text);
|
||||
var chara = DanMachiModelBuilder.Instance.SpawnCharacter(newData);
|
||||
chara.PastePose(pose, PoseLoadOptions.All());
|
||||
}
|
||||
|
||||
public void SelectAnimationSet(int value)
|
||||
{
|
||||
if(value == 0)
|
||||
{
|
||||
AnimationDropdown.SetOptions(null);
|
||||
return;
|
||||
}
|
||||
var data = _selectedChara.Data;
|
||||
var animSet = DanMachiAssetLibrary.Instance.Animations.First(a => a.Category == data.Category && a.Id == data.Id && a.Costume == AnimationSetDropdown.options[value].text);
|
||||
|
||||
_selectedChara.LoadAnimationSet(animSet);
|
||||
|
||||
AnimationDropdown.SetOptions(_selectedChara.Animations.Select(a=>a.name).ToList(), true);
|
||||
}
|
||||
|
||||
public void SelectAnimation(int value)
|
||||
{
|
||||
if (value == 0)
|
||||
{
|
||||
_selectedChara.PlayAnimation((AnimationClip)null);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
_selectedChara.PlayAnimation(_selectedChara.Animations[value-1]);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 26a550c137eb4ff42aebcf10b11d5626
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,6 @@
|
|||
using UnityEngine;
|
||||
|
||||
public interface IAnimated
|
||||
{
|
||||
public Animator GetAnimator();
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 14fe157a3aea9784d892f9bc75881dc9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -169,7 +169,7 @@ public class ObjectContainer : MonoBehaviour, IKeyframeSetter
|
|||
public virtual void SetKeyframe(int frameNum = -1)
|
||||
{
|
||||
if (DoNotSave || !_setKeyframe) return;
|
||||
Debug.Log("Setting frame for " + name);
|
||||
//Debug.Log("Setting frame for " + name);
|
||||
//if (Frames.Count == 0) SetDefaultFrame();
|
||||
if (frameNum == -1) frameNum = TimelineController.Instance.CurrentFrame;
|
||||
|
||||
|
|
|
@ -11,187 +11,187 @@ using UnityEngine.Networking;
|
|||
|
||||
public class ModelViewerDownloader
|
||||
{
|
||||
public static string UrlBase = "";
|
||||
public static string SaveLocation = "/idbfs/ModelViewer/";
|
||||
// public static string UrlBase = "";
|
||||
// public static string SaveLocation = "/idbfs/ModelViewer/";
|
||||
|
||||
public static ModelViewerDownloader Instance;
|
||||
public bool SyncRequired;
|
||||
// public static ModelViewerDownloader Instance;
|
||||
// public bool SyncRequired;
|
||||
|
||||
public ModelViewerDownloader() : this(UrlBase, "/idbfs/ModelViewer/") { }
|
||||
// public ModelViewerDownloader() : this(UrlBase, "/idbfs/ModelViewer/") { }
|
||||
|
||||
public ModelViewerDownloader(string baseUrl, string saveLocation)
|
||||
{
|
||||
UrlBase = baseUrl;
|
||||
SaveLocation = saveLocation;
|
||||
ModelViewerMain.GetInstance().StartCoroutine(Loop());
|
||||
}
|
||||
// public ModelViewerDownloader(string baseUrl, string saveLocation)
|
||||
// {
|
||||
// UrlBase = baseUrl;
|
||||
// SaveLocation = saveLocation;
|
||||
// ModelViewerMain.GetInstance().StartCoroutine(Loop());
|
||||
// }
|
||||
|
||||
public class DownloadTask
|
||||
{
|
||||
public string Name;
|
||||
public bool Redownload = false;
|
||||
public bool Finished = false;
|
||||
public bool Success = false;
|
||||
public int Priority = 0;
|
||||
public string ResultText;
|
||||
public byte[] ResultBytes;
|
||||
public System.Action OnDownloadSuccess;
|
||||
// public class DownloadTask
|
||||
// {
|
||||
// public string Name;
|
||||
// public bool Redownload = false;
|
||||
// public bool Finished = false;
|
||||
// public bool Success = false;
|
||||
// public int Priority = 0;
|
||||
// public string ResultText;
|
||||
// public byte[] ResultBytes;
|
||||
// public System.Action OnDownloadSuccess;
|
||||
|
||||
public DownloadTask(string name, int priority, bool redownload)
|
||||
{
|
||||
Name = name;
|
||||
Priority = priority;
|
||||
Redownload = redownload;
|
||||
}
|
||||
}
|
||||
// public DownloadTask(string name, int priority, bool redownload)
|
||||
// {
|
||||
// Name = name;
|
||||
// Priority = priority;
|
||||
// Redownload = redownload;
|
||||
// }
|
||||
// }
|
||||
|
||||
private static List<DownloadTask> _downloadRunning = new List<DownloadTask>();
|
||||
private static List<DownloadTask> _downloadQueue = new List<DownloadTask>();
|
||||
// private static List<DownloadTask> _downloadRunning = new List<DownloadTask>();
|
||||
// private static List<DownloadTask> _downloadQueue = new List<DownloadTask>();
|
||||
|
||||
public IEnumerator Loop()
|
||||
{
|
||||
float lastSync = 5;
|
||||
while (true)
|
||||
{
|
||||
if(_downloadQueue.Count > 0)
|
||||
{
|
||||
_downloadRunning.AddRange(_downloadQueue);
|
||||
_downloadRunning = _downloadRunning.OrderByDescending(d=>d.Priority).ToList();
|
||||
_downloadQueue.Clear();
|
||||
}
|
||||
if(_downloadRunning.Count > 0)
|
||||
{
|
||||
var fileToDownload = _downloadRunning[0];
|
||||
_downloadRunning.RemoveAt(0);
|
||||
yield return DownloadFile(fileToDownload);
|
||||
if(!_downloadRunning.Any() && !_downloadQueue.Any())
|
||||
{
|
||||
SyncRequired = true;
|
||||
lastSync = 0;
|
||||
}
|
||||
}
|
||||
if(SyncRequired)
|
||||
{
|
||||
lastSync += Time.deltaTime;
|
||||
if(lastSync >= 5)
|
||||
{
|
||||
CommitChanges();
|
||||
}
|
||||
}
|
||||
yield return 0;
|
||||
}
|
||||
}
|
||||
// public IEnumerator Loop()
|
||||
// {
|
||||
// float lastSync = 5;
|
||||
// while (true)
|
||||
// {
|
||||
// if(_downloadQueue.Count > 0)
|
||||
// {
|
||||
// _downloadRunning.AddRange(_downloadQueue);
|
||||
// _downloadRunning = _downloadRunning.OrderByDescending(d=>d.Priority).ToList();
|
||||
// _downloadQueue.Clear();
|
||||
// }
|
||||
// if(_downloadRunning.Count > 0)
|
||||
// {
|
||||
// var fileToDownload = _downloadRunning[0];
|
||||
// _downloadRunning.RemoveAt(0);
|
||||
// yield return DownloadFile(fileToDownload);
|
||||
// if(!_downloadRunning.Any() && !_downloadQueue.Any())
|
||||
// {
|
||||
// SyncRequired = true;
|
||||
// lastSync = 0;
|
||||
// }
|
||||
// }
|
||||
// if(SyncRequired)
|
||||
// {
|
||||
// lastSync += Time.deltaTime;
|
||||
// if(lastSync >= 5)
|
||||
// {
|
||||
// CommitChanges();
|
||||
// }
|
||||
// }
|
||||
// yield return 0;
|
||||
// }
|
||||
// }
|
||||
|
||||
public static IEnumerator WaitForDownload(string name, int priority = 0, bool redownload = false, System.Action<string[]> lines = null, System.Action<byte[]> bytes = null, System.Action<string> text = null, System.Action onDownloadSuccess = null)
|
||||
{
|
||||
var task = _downloadQueue.Concat(_downloadRunning).FirstOrDefault(t => t.Name == name);
|
||||
// public static IEnumerator WaitForDownload(string name, int priority = 0, bool redownload = false, System.Action<string[]> lines = null, System.Action<byte[]> bytes = null, System.Action<string> text = null, System.Action onDownloadSuccess = null)
|
||||
// {
|
||||
// var task = _downloadQueue.Concat(_downloadRunning).FirstOrDefault(t => t.Name == name);
|
||||
|
||||
if(task == null)
|
||||
{
|
||||
task = new DownloadTask(name, priority, redownload);
|
||||
task.OnDownloadSuccess = onDownloadSuccess;
|
||||
_downloadQueue.Add(task);
|
||||
}
|
||||
// if(task == null)
|
||||
// {
|
||||
// task = new DownloadTask(name, priority, redownload);
|
||||
// task.OnDownloadSuccess = onDownloadSuccess;
|
||||
// _downloadQueue.Add(task);
|
||||
// }
|
||||
|
||||
while (!task.Finished)
|
||||
{
|
||||
yield return 0;
|
||||
}
|
||||
// while (!task.Finished)
|
||||
// {
|
||||
// yield return 0;
|
||||
// }
|
||||
|
||||
lines?.Invoke(task.ResultText.Split('\n').Select(s => s.Trim()).ToArray());
|
||||
bytes?.Invoke(task.ResultBytes);
|
||||
text?.Invoke(task.ResultText);
|
||||
}
|
||||
// lines?.Invoke(task.ResultText.Split('\n').Select(s => s.Trim()).ToArray());
|
||||
// bytes?.Invoke(task.ResultBytes);
|
||||
// text?.Invoke(task.ResultText);
|
||||
// }
|
||||
|
||||
private IEnumerator DownloadFile(DownloadTask task)
|
||||
{
|
||||
#if UNITY_WEBGL && !UNITY_EDITOR
|
||||
string fileSavePath = $"{SaveLocation}{task.Name}";
|
||||
#else
|
||||
string fileSavePath = Application.persistentDataPath + " /" + task.Name;
|
||||
#endif
|
||||
// private IEnumerator DownloadFile(DownloadTask task)
|
||||
// {
|
||||
//#if UNITY_WEBGL && !UNITY_EDITOR
|
||||
// string fileSavePath = $"{SaveLocation}{task.Name}";
|
||||
//#else
|
||||
// string fileSavePath = Application.persistentDataPath + " /" + task.Name;
|
||||
//#endif
|
||||
|
||||
if (!task.Redownload && LoadFromIdbfs(fileSavePath, out var data))
|
||||
{
|
||||
//Debug.Log("Loaded from " + fileSavePath);
|
||||
task.Success = true;
|
||||
task.ResultText = Encoding.UTF8.GetString(data);
|
||||
task.ResultBytes = data;
|
||||
task.Finished = true;
|
||||
yield break;
|
||||
}
|
||||
// if (!task.Redownload && LoadFromIdbfs(fileSavePath, out var data))
|
||||
// {
|
||||
// //Debug.Log("Loaded from " + fileSavePath);
|
||||
// task.Success = true;
|
||||
// task.ResultText = Encoding.UTF8.GetString(data);
|
||||
// task.ResultBytes = data;
|
||||
// task.Finished = true;
|
||||
// yield break;
|
||||
// }
|
||||
|
||||
string url = UrlBase + task.Name + (task.Redownload ? "?time=" + DateTime.Now.Ticks.ToString() : "");
|
||||
//var downloadPanel = KFKViewerUI.Instance.DownloadPanel;
|
||||
// string url = UrlBase + task.Name + (task.Redownload ? "?time=" + DateTime.Now.Ticks.ToString() : "");
|
||||
// //var downloadPanel = KFKViewerUI.Instance.DownloadPanel;
|
||||
|
||||
//Msg.Log(url);
|
||||
// //Msg.Log(url);
|
||||
|
||||
using (var www = UnityWebRequest.Get(url))
|
||||
{
|
||||
//downloadPanel.gameObject.SetActive(true);
|
||||
// using (var www = UnityWebRequest.Get(url))
|
||||
// {
|
||||
// //downloadPanel.gameObject.SetActive(true);
|
||||
|
||||
var operation = www.SendWebRequest();
|
||||
// var operation = www.SendWebRequest();
|
||||
|
||||
do
|
||||
{
|
||||
//downloadPanel.SetStatus(task.Name, www.downloadProgress);
|
||||
yield return null;
|
||||
}
|
||||
while (!operation.isDone);
|
||||
// do
|
||||
// {
|
||||
// //downloadPanel.SetStatus(task.Name, www.downloadProgress);
|
||||
// yield return null;
|
||||
// }
|
||||
// while (!operation.isDone);
|
||||
|
||||
if (www.result != UnityWebRequest.Result.Success)
|
||||
{
|
||||
Error.Log(Color.red, www.error);
|
||||
task.Success = false;
|
||||
task.ResultText = "";
|
||||
task.ResultBytes = new byte[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
SaveToIdbfs(fileSavePath, www.downloadHandler.data);
|
||||
task.OnDownloadSuccess?.Invoke();
|
||||
task.Success = true;
|
||||
task.ResultText = www.downloadHandler.text;
|
||||
task.ResultBytes = www.downloadHandler.data;
|
||||
}
|
||||
}
|
||||
// if (www.result != UnityWebRequest.Result.Success)
|
||||
// {
|
||||
// Error.Log(Color.red, www.error);
|
||||
// task.Success = false;
|
||||
// task.ResultText = "";
|
||||
// task.ResultBytes = new byte[0];
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// SaveToIdbfs(fileSavePath, www.downloadHandler.data);
|
||||
// task.OnDownloadSuccess?.Invoke();
|
||||
// task.Success = true;
|
||||
// task.ResultText = www.downloadHandler.text;
|
||||
// task.ResultBytes = www.downloadHandler.data;
|
||||
// }
|
||||
// }
|
||||
|
||||
//downloadPanel.SetStatus(task.Name, 0);
|
||||
//downloadPanel.gameObject.SetActive(false);
|
||||
// //downloadPanel.SetStatus(task.Name, 0);
|
||||
// //downloadPanel.gameObject.SetActive(false);
|
||||
|
||||
task.Finished = true;
|
||||
}
|
||||
// task.Finished = true;
|
||||
// }
|
||||
|
||||
public static bool LoadFromIdbfs(string name, out byte[] data)
|
||||
{
|
||||
if(File.Exists(name))
|
||||
{
|
||||
data = File.ReadAllBytes(name);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
data = null;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// public static bool LoadFromIdbfs(string name, out byte[] data)
|
||||
// {
|
||||
// if(File.Exists(name))
|
||||
// {
|
||||
// data = File.ReadAllBytes(name);
|
||||
// return true;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// data = null;
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
|
||||
public static void SaveToIdbfs(string path, byte[] data)
|
||||
{
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
File.WriteAllBytes(path, data);
|
||||
//Debug.Log("Saved " + path);
|
||||
}
|
||||
// public static void SaveToIdbfs(string path, byte[] data)
|
||||
// {
|
||||
// Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
// File.WriteAllBytes(path, data);
|
||||
// //Debug.Log("Saved " + path);
|
||||
// }
|
||||
|
||||
private static void CommitChanges()
|
||||
{
|
||||
Instance.SyncRequired = false;
|
||||
Debug.Log("Database Updated");
|
||||
#if UNITY_WEBGL && !UNITY_EDITOR
|
||||
SyncFiles();
|
||||
#endif
|
||||
}
|
||||
// private static void CommitChanges()
|
||||
// {
|
||||
// Instance.SyncRequired = false;
|
||||
// Debug.Log("Database Updated");
|
||||
//#if UNITY_WEBGL && !UNITY_EDITOR
|
||||
// SyncFiles();
|
||||
//#endif
|
||||
// }
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void SyncFiles();
|
||||
// [DllImport("__Internal")]
|
||||
// private static extern void SyncFiles();
|
||||
}
|
||||
|
|
|
@ -26,6 +26,9 @@ public class ModelViewerInterface : MonoBehaviour
|
|||
public RectTransform Tooltip;
|
||||
public TMPro.TextMeshProUGUI TooltipText;
|
||||
|
||||
private Vector2 _previousResolution = Vector2.zero;
|
||||
private int _resolutionUpdateCountdown;
|
||||
|
||||
public static ModelViewerInterface GetInstance()
|
||||
{
|
||||
return _mainInstance;
|
||||
|
@ -36,6 +39,29 @@ public class ModelViewerInterface : MonoBehaviour
|
|||
return _mainInstance as T;
|
||||
}
|
||||
|
||||
|
||||
protected void Update()
|
||||
{
|
||||
var resolution = new Vector2(Screen.width, Screen.height);
|
||||
if (resolution != _previousResolution)
|
||||
{
|
||||
_previousResolution = resolution;
|
||||
_resolutionUpdateCountdown = 10;
|
||||
}
|
||||
|
||||
if (_resolutionUpdateCountdown > 0)
|
||||
{
|
||||
if (--_resolutionUpdateCountdown == 0)
|
||||
{
|
||||
var draggables = GameObject.FindObjectsOfType<UIElementDragger>();
|
||||
foreach (var draggable in draggables)
|
||||
{
|
||||
draggable.transform.position = draggable.RecalculatePosition(draggable.transform.position);
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetTooltip(int index, string tooltip)
|
||||
{
|
||||
var tooltips = GetInstance().TooltipLabels;
|
||||
|
@ -45,7 +71,6 @@ public class ModelViewerInterface : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public static void ToggleVisible(GameObject go)
|
||||
{
|
||||
ToggleVisible(go, false);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using static UnityEngine.Rendering.VirtualTexturing.Debugging;
|
||||
using UnityEngine.UI;
|
||||
|
||||
[RequireComponent(typeof(CanvasGroup))]
|
||||
public class UIElementDragger : MonoBehaviour, IDragHandler, IEndDragHandler, IPointerDownHandler, IPointerUpHandler
|
||||
|
@ -48,12 +49,12 @@ public class UIElementDragger : MonoBehaviour, IDragHandler, IEndDragHandler, IP
|
|||
}
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
private void Start()
|
||||
{
|
||||
var handle = HandlePosition.GetComponent<RectTransform>();
|
||||
transform.position = new Vector2(
|
||||
Mathf.Clamp(transform.position.x, 0, Screen.width - handle.rect.width),
|
||||
Mathf.Clamp(transform.position.y, handle.sizeDelta.y, Screen.height));
|
||||
if (Proxy == null)
|
||||
{
|
||||
transform.position = RecalculatePosition(transform.position);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetProxyMode(UIDraggableProxy proxy)
|
||||
|
@ -81,18 +82,19 @@ public class UIElementDragger : MonoBehaviour, IDragHandler, IEndDragHandler, IP
|
|||
}
|
||||
else
|
||||
{
|
||||
var canvas = ModelViewerInterface.GetInstance().MainCanvas;
|
||||
var proxyRect = Proxy.transform as RectTransform;
|
||||
var handleRect = HandlePosition.transform as RectTransform;
|
||||
var handleOffset = handleRect.sizeDelta.y * Vector3.up;
|
||||
var handleOffset = handleRect.sizeDelta.y * canvas.scaleFactor * Vector3.up;
|
||||
if (Proxy.GetComponentInParent<UIToolbar>().Layout == UIToolbar.LayoutMode.Vertical)
|
||||
{
|
||||
//anchor to top-right of button
|
||||
transform.position = proxyRect.position + proxyRect.sizeDelta.x * Vector3.right + handleOffset;
|
||||
transform.position = proxyRect.position + proxyRect.sizeDelta.x * canvas.scaleFactor * Vector3.right + handleOffset;
|
||||
}
|
||||
else
|
||||
{
|
||||
//anchor to bottom-left of button
|
||||
transform.position = proxyRect.position + proxyRect.sizeDelta.y * Vector3.up - handleOffset;
|
||||
transform.position = proxyRect.position + proxyRect.sizeDelta.y * canvas.scaleFactor * Vector3.up - handleOffset;
|
||||
}
|
||||
gameObject.SetActive(true);
|
||||
}
|
||||
|
@ -126,11 +128,7 @@ public class UIElementDragger : MonoBehaviour, IDragHandler, IEndDragHandler, IP
|
|||
}
|
||||
case DragAction.Position:
|
||||
{
|
||||
var handle = HandlePosition.GetComponent<RectTransform>();
|
||||
|
||||
transform.position = new Vector2(
|
||||
Mathf.Clamp(Input.mousePosition.x + mouseOffset.x, 0, Screen.width - handle.rect.width),
|
||||
Mathf.Clamp(Input.mousePosition.y + mouseOffset.y, handle.sizeDelta.y, Screen.height));
|
||||
transform.position = RecalculatePosition((Vector2)Input.mousePosition + mouseOffset);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -184,4 +182,16 @@ public class UIElementDragger : MonoBehaviour, IDragHandler, IEndDragHandler, IP
|
|||
{
|
||||
OnEndDrag(null);
|
||||
}
|
||||
|
||||
public Vector2 RecalculatePosition(Vector2 pos)
|
||||
{
|
||||
var handle = HandlePosition.transform as RectTransform;
|
||||
var tsf = transform as RectTransform;
|
||||
var canvas = ModelViewerInterface.GetInstance().MainCanvas;
|
||||
|
||||
var xPos = Mathf.Clamp(pos.x, 0, Screen.width - tsf.sizeDelta.x * canvas.scaleFactor);
|
||||
var yPos = Mathf.Clamp(pos.y, handle.sizeDelta.y * canvas.scaleFactor, Screen.height);
|
||||
|
||||
return new Vector2 (xPos, yPos);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,9 +12,13 @@ public class Screenshot : MonoBehaviour
|
|||
bool recording = false;
|
||||
|
||||
public Button RecordButton;
|
||||
public TMPro.TMP_InputField ScreenshotWidth;
|
||||
public TMPro.TMP_InputField ScreenshotHeight;
|
||||
public Toggle ScreenshotTransparent;
|
||||
public TMPro.TMP_InputField
|
||||
ScreenshotWidth,
|
||||
ScreenshotHeight,
|
||||
GifWidth,
|
||||
GifHeight;
|
||||
public TMPro.TMP_Dropdown CaptureAntialiasing;
|
||||
public Toggle CaptureTransparent;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
|
@ -24,11 +28,11 @@ public class Screenshot : MonoBehaviour
|
|||
public void TakeScreenshot()
|
||||
{
|
||||
var camera = ModelViewerMain.GetInstance().GetCamera().Cam;
|
||||
int width = int.Parse(ScreenshotWidth.text);
|
||||
int height = int.Parse(ScreenshotHeight.text);
|
||||
width = width == -1 ? Screen.width : width;
|
||||
height = height == -1 ? Screen.height : height;
|
||||
var image = GrabFrame(camera, width, height, ScreenshotTransparent.isOn);
|
||||
int width = string.IsNullOrEmpty(ScreenshotWidth.text)? 0 : int.Parse(ScreenshotWidth.text);
|
||||
int height = string.IsNullOrEmpty(ScreenshotHeight.text) ? 0 : int.Parse(ScreenshotHeight.text);
|
||||
width = width == 0 ? Screen.width : width;
|
||||
height = height == 0 ? Screen.height : height;
|
||||
var image = GrabFrame(camera, width, height, CaptureTransparent.isOn, GetAntialiasing());
|
||||
|
||||
string fileName = Application.dataPath + "/../Screenshots/" + string.Format("UniViewer_{0}", DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss-fff"));
|
||||
byte[] pngShot = ImageConversion.EncodeToPNG(image);
|
||||
|
@ -41,55 +45,53 @@ public class Screenshot : MonoBehaviour
|
|||
|
||||
public void BeginRecordGif()
|
||||
{
|
||||
if (recording || ModelViewerMain.GetInstance().SelectedObject == null) return;
|
||||
if (recording || ModelViewerMain.GetInstance().SelectedObject == null)
|
||||
{
|
||||
Error.Log(Color.yellow, "Target not found");
|
||||
return;
|
||||
}
|
||||
recording = true;
|
||||
RecordButton.interactable = false;
|
||||
StartCoroutine(RecordGif(int.Parse(ScreenshotWidth.text), int.Parse(ScreenshotHeight.text), ScreenshotTransparent.isOn, 10)); //(int)UmaViewerUI.Instance.GifQuality.value));
|
||||
int width = string.IsNullOrEmpty(GifWidth.text) ? 0 : int.Parse(GifWidth.text);
|
||||
int height = string.IsNullOrEmpty(GifHeight.text) ? 0 : int.Parse(GifHeight.text);
|
||||
ModelViewerMain.GetInstance().StartCoroutine(RecordGif(width, height, CaptureTransparent.isOn, GetAntialiasing())); //(int)UmaViewerUI.Instance.GifQuality.value));
|
||||
}
|
||||
|
||||
|
||||
private IEnumerator RecordGif(int width, int height, bool transparent, int quality)
|
||||
private IEnumerator RecordGif(int width, int height, bool transparent, int antialiasing)
|
||||
{
|
||||
yield break;
|
||||
//var camera = GetActiveCamera();
|
||||
//var ppLayer = camera.GetComponent<PostProcessLayer>();
|
||||
//bool oldPpState = ppLayer.enabled;
|
||||
//ppLayer.enabled = false;
|
||||
var camera = ModelViewerMain.GetInstance().GetCamera().Cam;
|
||||
|
||||
//var uma = UmaViewerBuilder.Instance.CurrentUMAContainer;
|
||||
//var animator = uma.UmaAnimator;
|
||||
//if (animator == null) yield break;
|
||||
var currentCharacter = ModelViewerMain.GetInstance().SelectedObject;
|
||||
|
||||
//int frame = 0;
|
||||
//var animeClip = uma.OverrideController["clip_2"];
|
||||
//var clipFrameCount = Mathf.RoundToInt(animeClip.length * animeClip.frameRate);
|
||||
//StartCoroutine(CaptureToGIFCustom.Instance.Encode(animeClip.frameRate, quality));
|
||||
if (currentCharacter as IAnimated == null) yield break;
|
||||
|
||||
//UmaViewerUI.Instance.AnimationSpeedChange(0);
|
||||
//UmaViewerUI.Instance.AnimationProgressChange(0);
|
||||
//yield return new WaitForSeconds(1); //wait for dynamicBone to settle;
|
||||
var animator = (currentCharacter as IAnimated).GetAnimator();
|
||||
|
||||
//while (frame < clipFrameCount)
|
||||
//{
|
||||
// UmaViewerUI.Instance.GifSlider.value = (float)frame / clipFrameCount;
|
||||
// UmaViewerUI.Instance.AnimationProgressChange((float)frame / clipFrameCount);
|
||||
// yield return new WaitForEndOfFrame();
|
||||
// var tex = GrabFrame(camera, width, height, transparent, transparent);
|
||||
// CaptureToGIFCustom.Instance.Frames.Add(new Image(tex));
|
||||
// Destroy(tex);
|
||||
// frame++;
|
||||
//}
|
||||
if (animator == null) yield break;
|
||||
|
||||
//recording = false;
|
||||
//UmaViewerUI.Instance.AnimationProgressChange(0);
|
||||
//UmaViewerUI.Instance.AnimationSpeedChange(1);
|
||||
//ppLayer.enabled = oldPpState;
|
||||
//CaptureToGIFCustom.Instance.stop = true;
|
||||
//UmaViewerUI.Instance.GifButton.interactable = true;
|
||||
//UmaViewerUI.Instance.GifSlider.value = 1;
|
||||
int frame = 0;
|
||||
var animeClip = (animator.runtimeAnimatorController as AnimatorOverrideController)["Anim"];
|
||||
var clipFrameCount = Mathf.RoundToInt(animeClip.length * animeClip.frameRate);
|
||||
ModelViewerMain.GetInstance().StartCoroutine(CaptureToGIFCustom.Instance.Encode(animeClip.frameRate, 10));
|
||||
|
||||
animator.speed = 0;
|
||||
while (frame < clipFrameCount)
|
||||
{
|
||||
animator.Play("Anim", 0, (float)frame / clipFrameCount);
|
||||
yield return new WaitForEndOfFrame();
|
||||
var tex = GrabFrame(camera, width, height, transparent, antialiasing, transparent);
|
||||
CaptureToGIFCustom.Instance.Frames.Add(new Image(tex));
|
||||
Destroy(tex);
|
||||
frame++;
|
||||
}
|
||||
|
||||
recording = false;
|
||||
CaptureToGIFCustom.Instance.stop = true;
|
||||
RecordButton.interactable = true;
|
||||
}
|
||||
|
||||
public static Texture2D GrabFrame(Camera cam, int width, int height, bool transparent = true, bool gifBackground = false)
|
||||
public static Texture2D GrabFrame(Camera cam, int width, int height, bool transparent = true, int antialiasing = 2, bool gifBackground = false)
|
||||
{
|
||||
var dimensions = GetResolution(width, height);
|
||||
width = dimensions.x;
|
||||
|
@ -111,7 +113,7 @@ public class Screenshot : MonoBehaviour
|
|||
}
|
||||
|
||||
var tex_color = new Texture2D(width, height, TextureFormat.ARGB32, false);
|
||||
var render_texture = RenderTexture.GetTemporary(width, height, 24, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Default, 8);
|
||||
var render_texture = RenderTexture.GetTemporary(width, height, 24, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Default, antialiasing);
|
||||
var grab_area = new Rect(0, 0, width, height);
|
||||
|
||||
RenderTexture.active = render_texture;
|
||||
|
@ -150,4 +152,9 @@ public class Screenshot : MonoBehaviour
|
|||
}
|
||||
return new Vector2Int(width, height);
|
||||
}
|
||||
|
||||
private int GetAntialiasing()
|
||||
{
|
||||
return int.Parse(CaptureAntialiasing.options[CaptureAntialiasing.value].text);
|
||||
}
|
||||
}
|
|
@ -1,3 +1,14 @@
|
|||
#if !UNITY_EDITOR
|
||||
using UnityEngine;
|
||||
|
||||
[System.AttributeUsage(System.AttributeTargets.Field, Inherited = false, AllowMultiple = true)]
|
||||
public sealed class ShowIfAttribute : PropertyAttribute
|
||||
{
|
||||
public ShowIfAttribute(string ConditionalSourceField, bool expectedValue, bool HideInInspector = false)
|
||||
{
|
||||
}
|
||||
}
|
||||
#else
|
||||
/* Title : Attribute for show a field if other field is true or false.
|
||||
* Author : Anth
|
||||
*/
|
||||
|
@ -107,4 +118,6 @@ public class ConditionalHidePropertyDrawer : PropertyDrawer
|
|||
return false;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
|
@ -2,27 +2,32 @@
|
|||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using System.Threading;
|
||||
using System.Text;
|
||||
using System;
|
||||
|
||||
namespace uGIF
|
||||
{
|
||||
public class CaptureToGIFCustom : MonoBehaviour
|
||||
public class CaptureToGIFCustom
|
||||
{
|
||||
public static CaptureToGIFCustom Instance;
|
||||
private static CaptureToGIFCustom _instance;
|
||||
public static CaptureToGIFCustom Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_instance == null)
|
||||
{
|
||||
_instance = new CaptureToGIFCustom();
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public List<Image> Frames = new List<Image>();
|
||||
public bool stop = false;
|
||||
|
||||
[System.NonSerialized]
|
||||
public byte[] bytes = null;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
|
||||
public IEnumerator Encode (float fps, int quality)
|
||||
{
|
||||
bytes = null;
|
||||
|
|
|
@ -4,12 +4,6 @@
|
|||
EditorBuildSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Scenes:
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/KF3.unity
|
||||
guid: 50cd194efc5f9c44d9b6ee9079abd64d
|
||||
- enabled: 0
|
||||
path: Assets/Chess/Scenes/Chess.unity
|
||||
guid: 9fc0d4010bbf28b4594072e72b8655ab
|
||||
m_Scenes: []
|
||||
m_configObjects:
|
||||
com.unity.addressableassets: {fileID: 11400000, guid: b64b0d6fb382f914188c46350b1a2235, type: 2}
|
||||
|
|
|
@ -12,8 +12,8 @@ PlayerSettings:
|
|||
targetDevice: 2
|
||||
useOnDemandResources: 0
|
||||
accelerometerFrequency: 60
|
||||
companyName: Katboi01
|
||||
productName: KF3ModelViewer
|
||||
companyName: Katworks
|
||||
productName: DanMachi Viewer
|
||||
defaultCursor: {fileID: 0}
|
||||
cursorHotspot: {x: 0, y: 0}
|
||||
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
|
||||
|
@ -134,7 +134,7 @@ PlayerSettings:
|
|||
16:10: 1
|
||||
16:9: 1
|
||||
Others: 1
|
||||
bundleVersion: 3.1.10 animation edition
|
||||
bundleVersion: 1.0.0
|
||||
preloadedAssets: []
|
||||
metroInputSource: 0
|
||||
wsaTransparentSwapchain: 0
|
||||
|
|
Loading…
Reference in New Issue