add MobUma support
This commit is contained in:
+270
-118
@@ -2702,10 +2702,10 @@ RectTransform:
|
||||
m_Father: {fileID: 733646225}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 2034.2386, y: -30}
|
||||
m_SizeDelta: {x: 413.69547, y: 60}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &127647253
|
||||
MonoBehaviour:
|
||||
@@ -3808,10 +3808,10 @@ RectTransform:
|
||||
m_Father: {fileID: 733646225}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 1620.5432, y: -30}
|
||||
m_SizeDelta: {x: 413.69547, y: 60}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &197132282
|
||||
GameObject:
|
||||
@@ -7233,6 +7233,135 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 354822016}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1001 &357170039
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 1407801838}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1608283224055752807, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1608283224055752807, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1608283224055752807, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1608283224055752807, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1608283224055752807, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1608283224055752807, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1608283224055752807, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1608283224055752807, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 255.99
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1608283224055752807, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: -440
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1608283224055752807, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1608283224055752807, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1608283224055752807, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1608283224055752807, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1608283224055752807, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1608283224055752807, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1608283224055752807, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1608283224055752807, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: -0.98999023
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1608283224055752807, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -220
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1608283224055752807, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1608283224055752807, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1608283224055752807, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2959287579813893925, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: PageControl
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4805765083922032393, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 255.99
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4805765083922032393, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: -0.0009918213
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 14d034506760e5049a12fd1cf057a8b3, type: 3}
|
||||
--- !u!1 &357312446
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -8159,10 +8288,10 @@ RectTransform:
|
||||
m_Father: {fileID: 1200264883}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 375, y: -15}
|
||||
m_SizeDelta: {x: 250, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &399621055
|
||||
MonoBehaviour:
|
||||
@@ -8643,9 +8772,9 @@ RectTransform:
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: -17, y: 0}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!114 &418000890
|
||||
MonoBehaviour:
|
||||
@@ -12826,10 +12955,10 @@ RectTransform:
|
||||
m_Father: {fileID: 1704906816}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 220}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 283, y: -702.18}
|
||||
m_SizeDelta: {x: 283, y: 220}
|
||||
m_Pivot: {x: 1, y: 0.5}
|
||||
--- !u!114 &548276325
|
||||
MonoBehaviour:
|
||||
@@ -14761,10 +14890,10 @@ RectTransform:
|
||||
m_Father: {fileID: 1704906816}
|
||||
m_RootOrder: 8
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 40}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 141.5, y: -912.18}
|
||||
m_SizeDelta: {x: 283, y: 40}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &673546063
|
||||
MonoBehaviour:
|
||||
@@ -16198,10 +16327,10 @@ RectTransform:
|
||||
m_Father: {fileID: 1200264883}
|
||||
m_RootOrder: 6
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 625, y: -45}
|
||||
m_SizeDelta: {x: 250, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &695996366
|
||||
MonoBehaviour:
|
||||
@@ -20103,10 +20232,10 @@ RectTransform:
|
||||
m_Father: {fileID: 1704906816}
|
||||
m_RootOrder: 20
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 40}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 141.5, y: -1152.1799}
|
||||
m_SizeDelta: {x: 283, y: 40}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &842158913
|
||||
MonoBehaviour:
|
||||
@@ -21147,10 +21276,10 @@ RectTransform:
|
||||
m_Father: {fileID: 1200264883}
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 375, y: -45}
|
||||
m_SizeDelta: {x: 250, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &886856743
|
||||
MonoBehaviour:
|
||||
@@ -21536,10 +21665,10 @@ RectTransform:
|
||||
m_Father: {fileID: 1704906816}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 40}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 141.5, y: -832.18}
|
||||
m_SizeDelta: {x: 283, y: 40}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &893956226
|
||||
MonoBehaviour:
|
||||
@@ -23087,10 +23216,10 @@ RectTransform:
|
||||
m_Father: {fileID: 1704906816}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 40}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 141.5, y: -20}
|
||||
m_SizeDelta: {x: 283, y: 40}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &991136001
|
||||
MonoBehaviour:
|
||||
@@ -23464,7 +23593,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 270, y: -15}
|
||||
m_AnchoredPosition: {x: 142.5, y: -15}
|
||||
m_SizeDelta: {x: 112.5, y: 30}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!114 &994710209
|
||||
@@ -24424,10 +24553,10 @@ RectTransform:
|
||||
m_Father: {fileID: 1704906816}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 40}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 141.5, y: -572.18}
|
||||
m_SizeDelta: {x: 283, y: 40}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1046617016
|
||||
MonoBehaviour:
|
||||
@@ -25183,6 +25312,24 @@ RectTransform:
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: -20, y: -20}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1092593580 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 2451699974473359926, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 357170039}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 74c8e9ce85fd19f4a897a5782348dd5b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!224 &1092593581 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 1608283224055752807, guid: 14d034506760e5049a12fd1cf057a8b3,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 357170039}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1099089906
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -25613,10 +25760,10 @@ RectTransform:
|
||||
m_Father: {fileID: 1704906816}
|
||||
m_RootOrder: 16
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 40}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 141.5, y: -1072.1799}
|
||||
m_SizeDelta: {x: 283, y: 40}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1111810906
|
||||
MonoBehaviour:
|
||||
@@ -27301,7 +27448,7 @@ MonoBehaviour:
|
||||
m_HandleRect: {fileID: 1882365342}
|
||||
m_Direction: 2
|
||||
m_Value: 1
|
||||
m_Size: 0.87017345
|
||||
m_Size: 0.8701734
|
||||
m_NumberOfSteps: 0
|
||||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
@@ -27378,10 +27525,10 @@ RectTransform:
|
||||
m_Father: {fileID: 1704906816}
|
||||
m_RootOrder: 14
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 40}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 141.5, y: -1032.1799}
|
||||
m_SizeDelta: {x: 283, y: 40}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1198130886
|
||||
MonoBehaviour:
|
||||
@@ -27649,10 +27796,10 @@ RectTransform:
|
||||
m_Father: {fileID: 733646225}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 1413.6954, y: 60}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!114 &1200264884
|
||||
MonoBehaviour:
|
||||
@@ -29035,10 +29182,10 @@ RectTransform:
|
||||
m_Father: {fileID: 1200264883}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 875, y: -15}
|
||||
m_SizeDelta: {x: 250, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1259881232
|
||||
MonoBehaviour:
|
||||
@@ -30973,10 +31120,10 @@ RectTransform:
|
||||
m_Father: {fileID: 1704906816}
|
||||
m_RootOrder: 12
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 40}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 141.5, y: -992.18}
|
||||
m_SizeDelta: {x: 283, y: 40}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1340983838
|
||||
MonoBehaviour:
|
||||
@@ -31106,10 +31253,10 @@ RectTransform:
|
||||
m_Father: {fileID: 1200264883}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 125, y: -45}
|
||||
m_SizeDelta: {x: 250, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1342289416
|
||||
MonoBehaviour:
|
||||
@@ -32172,6 +32319,7 @@ RectTransform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 1892028686}
|
||||
- {fileID: 1092593581}
|
||||
- {fileID: 1765749873}
|
||||
m_Father: {fileID: 1389187104}
|
||||
m_RootOrder: 2
|
||||
@@ -32974,10 +33122,10 @@ RectTransform:
|
||||
m_Father: {fileID: 1704906816}
|
||||
m_RootOrder: 18
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 40}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 141.5, y: -1112.1799}
|
||||
m_SizeDelta: {x: 283, y: 40}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1443320127
|
||||
MonoBehaviour:
|
||||
@@ -33833,7 +33981,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 142.5, y: -15}
|
||||
m_AnchoredPosition: {x: 270, y: -15}
|
||||
m_SizeDelta: {x: 112.5, y: 30}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!1 &1503272426
|
||||
@@ -35153,6 +35301,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Characters: []
|
||||
MobCharacters: []
|
||||
Lives: []
|
||||
Costumes: []
|
||||
ShadersLoaded: 0
|
||||
@@ -35184,7 +35333,10 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
canvasScaler: {fileID: 2005720240}
|
||||
CharactersList: {fileID: 1558324558}
|
||||
MobCharactersList: {fileID: 1892028687}
|
||||
MobCharactersPageCtrl: {fileID: 1092593580}
|
||||
CostumeList: {fileID: 270183827}
|
||||
MobCostumeList: {fileID: 1765749874}
|
||||
AnimationSetList: {fileID: 92965282}
|
||||
AnimationList: {fileID: 1440546413}
|
||||
AnimationPageCtrl: {fileID: 1236987731}
|
||||
@@ -37683,10 +37835,10 @@ RectTransform:
|
||||
m_Father: {fileID: 1704906816}
|
||||
m_RootOrder: 10
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 40}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 141.5, y: -952.18}
|
||||
m_SizeDelta: {x: 283, y: 40}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1664478986
|
||||
MonoBehaviour:
|
||||
@@ -38546,10 +38698,10 @@ RectTransform:
|
||||
m_Father: {fileID: 1200264883}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 625, y: -15}
|
||||
m_SizeDelta: {x: 250, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1690552083
|
||||
MonoBehaviour:
|
||||
@@ -38848,7 +39000,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0.000030517578}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 1172.1799}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!114 &1704906817
|
||||
MonoBehaviour:
|
||||
@@ -40422,7 +40574,7 @@ RectTransform:
|
||||
- {fileID: 976913102}
|
||||
- {fileID: 736156572}
|
||||
m_Father: {fileID: 1407801838}
|
||||
m_RootOrder: 1
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
@@ -42955,8 +43107,8 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -45.000244}
|
||||
m_SizeDelta: {x: 255, y: -90}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 255, y: -179.99998}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!114 &1892028687
|
||||
MonoBehaviour:
|
||||
@@ -45678,10 +45830,10 @@ RectTransform:
|
||||
m_Father: {fileID: 1200264883}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 125, y: -15}
|
||||
m_SizeDelta: {x: 250, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &2011080538
|
||||
MonoBehaviour:
|
||||
@@ -47579,10 +47731,10 @@ RectTransform:
|
||||
m_Father: {fileID: 1704906816}
|
||||
m_RootOrder: 6
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 40}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 141.5, y: -872.18}
|
||||
m_SizeDelta: {x: 283, y: 40}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &2091332067
|
||||
MonoBehaviour:
|
||||
@@ -50500,9 +50652,9 @@ RectTransform:
|
||||
m_Father: {fileID: 6878219667498913896}
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 106.5, y: -286}
|
||||
m_SizeDelta: {x: 180, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!114 &6878219665895574065
|
||||
@@ -51008,9 +51160,9 @@ RectTransform:
|
||||
m_Father: {fileID: 6878219667498913896}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 106.5, y: -57.2}
|
||||
m_SizeDelta: {x: 180, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!114 &6878219666109573094
|
||||
@@ -51115,10 +51267,10 @@ RectTransform:
|
||||
m_Father: {fileID: 1704906816}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 512.18}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 283, y: -296.09}
|
||||
m_SizeDelta: {x: 283, y: 512.18}
|
||||
m_Pivot: {x: 1, y: 0.5}
|
||||
--- !u!114 &6878219666121841225
|
||||
MonoBehaviour:
|
||||
@@ -53365,9 +53517,9 @@ RectTransform:
|
||||
m_Father: {fileID: 6878219667498913896}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 106.5, y: -171.6}
|
||||
m_SizeDelta: {x: 180, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!114 &6878219666841734894
|
||||
@@ -54196,9 +54348,9 @@ RectTransform:
|
||||
m_Father: {fileID: 6878219667498913896}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 106.5, y: -228.8}
|
||||
m_SizeDelta: {x: 180, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!114 &6878219667203546886
|
||||
@@ -55908,9 +56060,9 @@ RectTransform:
|
||||
m_Father: {fileID: 6878219667498913896}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 106.5, y: 0}
|
||||
m_SizeDelta: {x: 180, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!114 &6878219667749320559
|
||||
@@ -56128,9 +56280,9 @@ RectTransform:
|
||||
m_Father: {fileID: 6878219667498913896}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 106.5, y: -114.4}
|
||||
m_SizeDelta: {x: 180, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!1 &6878219667784581358
|
||||
|
||||
@@ -3,7 +3,7 @@ using UnityEngine.UI;
|
||||
|
||||
public class LiveCharacterSelect : MonoBehaviour
|
||||
{
|
||||
public int CharaId;
|
||||
public CharaEntry CharaEntry;
|
||||
public string CostumeId;
|
||||
public Image CharaImage;
|
||||
public Image BackGroundImage;
|
||||
@@ -18,13 +18,13 @@ public class LiveCharacterSelect : MonoBehaviour
|
||||
ui.ToggleUIPanel(ui.SelectCharacterPannel);
|
||||
}
|
||||
|
||||
public void SetValue(int charaId, string costumeId,Sprite charaSprite, Sprite costumeSprite)
|
||||
public void SetValue(CharaEntry charaentry, string costumeId, Sprite costumeSprite)
|
||||
{
|
||||
CharaId = charaId;
|
||||
CharaEntry = charaentry;
|
||||
CostumeId = costumeId;
|
||||
CharaImage.sprite = charaSprite;
|
||||
CharaImage.sprite = charaentry.Icon;
|
||||
BackGroundImage.enabled = true;
|
||||
BackGroundImage.sprite = charaSprite;
|
||||
BackGroundImage.sprite = charaentry.Icon;
|
||||
CostumeImage.sprite = costumeSprite;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ public class UmaContainer : MonoBehaviour
|
||||
public GameObject Body;
|
||||
public GameObject Tail;
|
||||
public GameObject Head;
|
||||
public GameObject Hair;
|
||||
|
||||
public List<Texture2D> TailTextures = new List<Texture2D>();
|
||||
|
||||
@@ -59,6 +60,12 @@ public class UmaContainer : MonoBehaviour
|
||||
public bool IsMini = false;
|
||||
public List<Texture2D> MiniHeadTextures = new List<Texture2D>();
|
||||
|
||||
[Header("Mob")]
|
||||
public bool IsMob = false;
|
||||
public DataRow MobDressColor;
|
||||
public DataRow MobHeadColor;
|
||||
public List<Texture2D> MobHeadTextures = new List<Texture2D>();
|
||||
|
||||
[Header("Physics")]
|
||||
public bool EnablePhysics = true;
|
||||
public List<CySpringDataContainer> cySpringDataContainers;
|
||||
@@ -132,15 +139,40 @@ public class UmaContainer : MonoBehaviour
|
||||
UmaAnimator.runtimeAnimatorController = OverrideController;
|
||||
}
|
||||
|
||||
public void MergeHairModel()
|
||||
{
|
||||
if (!Head || !Hair) return;
|
||||
|
||||
List<Transform> bodybones = new List<Transform>(Head.GetComponentsInChildren<Transform>());
|
||||
List<Transform> emptyBones = new List<Transform>();
|
||||
|
||||
var headHolder = Head.GetComponent<AssetHolder>();
|
||||
var hairHolder = Hair.GetComponent<AssetHolder>();
|
||||
|
||||
headHolder._assetTable.list.AddRange(hairHolder._assetTable.list);
|
||||
headHolder._assetTableValue.list.AddRange(hairHolder._assetTableValue.list);
|
||||
|
||||
//MergeHair
|
||||
var hairskins = Hair.GetComponentsInChildren<SkinnedMeshRenderer>();
|
||||
foreach (SkinnedMeshRenderer hairskin in hairskins)
|
||||
{
|
||||
hairskin.gameObject.transform.SetParent(Head.transform);
|
||||
emptyBones.AddRange(MergeBone(hairskin, bodybones));
|
||||
}
|
||||
Hair.gameObject.SetActive(false);
|
||||
|
||||
emptyBones.ForEach(a => { if (a) Destroy(a.gameObject); });
|
||||
}
|
||||
|
||||
public void SetHeight(int scale = 0)
|
||||
{
|
||||
if(scale == 0)
|
||||
if (scale == 0)
|
||||
{
|
||||
BodyScale = 1;
|
||||
}
|
||||
else if(scale == -1)
|
||||
else if (scale == -1)
|
||||
{
|
||||
BodyScale = (Convert.ToInt32(CharaData["scale"]) / 160f);
|
||||
BodyScale = (Convert.ToInt32(CharaData[IsMob ? "chara_height" : "scale"]) / 160f);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -47,6 +47,7 @@ public class UmaHeadData
|
||||
public int id;
|
||||
public string costumeId;
|
||||
public int tailId;
|
||||
public CharaEntry chara;
|
||||
}
|
||||
|
||||
public class UmaLyricsData
|
||||
@@ -94,6 +95,7 @@ public class CharaEntry
|
||||
public Sprite Icon;
|
||||
public int Id;
|
||||
public string ThemeColor;
|
||||
public bool IsMob;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
|
||||
@@ -131,6 +131,7 @@ public class UmaDatabaseController
|
||||
return ReadMaster(conn, "SELECT * FROM mob_data");
|
||||
}
|
||||
|
||||
|
||||
static IEnumerable<DataRow> ReadMaster(SqliteConnection conn,string sql)
|
||||
{
|
||||
SqliteCommand sqlite_cmd = conn.CreateCommand();
|
||||
@@ -178,18 +179,39 @@ public class UmaDatabaseController
|
||||
return ReadMaster(conn, $"SELECT * FROM dress_data C,(SELECT D.'index' dressid,D.'text' dressname FROM text_data D WHERE id like 14) T WHERE C.id like T.dressid");
|
||||
}
|
||||
|
||||
public static DataRow ReadCharaData(int id)
|
||||
public static DataRow ReadCharaData(CharaEntry chara)
|
||||
{
|
||||
foreach (var chara in instance.CharaData)
|
||||
foreach (var charaentry in chara.IsMob ? instance.MobCharaData : instance.CharaData)
|
||||
{
|
||||
if (Convert.ToInt32(chara["id"]) == id)
|
||||
if (Convert.ToInt32(charaentry[chara.IsMob ? "mob_id" : "id"]) == chara.Id)
|
||||
{
|
||||
return chara;
|
||||
return charaentry;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public static DataRow ReadMobDressColor(string mobid)
|
||||
{
|
||||
var results= ReadMaster(instance.masterDb, $"SELECT * FROM mob_dress_color_set WHERE id LIKE {mobid}");
|
||||
foreach(var data in results)
|
||||
{
|
||||
return data;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static DataRow ReadMobHairColor(string colorid)
|
||||
{
|
||||
var results= ReadMaster(instance.masterDb, $"SELECT * FROM mob_hair_color_set WHERE id LIKE {colorid}");
|
||||
foreach(var data in results)
|
||||
{
|
||||
return data;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void CloseAllConnection()
|
||||
{
|
||||
masterDb.Close();
|
||||
|
||||
@@ -51,37 +51,51 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
Instance = this;
|
||||
}
|
||||
|
||||
public IEnumerator LoadUma(int id, string costumeId, bool mini)
|
||||
public IEnumerator LoadUma(CharaEntry chara, string costumeId, bool mini)
|
||||
{
|
||||
UnloadUma();
|
||||
|
||||
int id = chara.Id;
|
||||
CurrentUMAContainer = new GameObject($"Chara_{id}_{costumeId}").AddComponent<UmaContainer>();
|
||||
|
||||
UnloadAllBundle();
|
||||
|
||||
CurrentUMAContainer.CharaData = UmaDatabaseController.ReadCharaData(id);
|
||||
if (mini)
|
||||
{
|
||||
LoadMiniUma(id, costumeId);
|
||||
CurrentUMAContainer.CharaData = UmaDatabaseController.ReadCharaData(chara);
|
||||
LoadMiniUma(chara, costumeId);
|
||||
}
|
||||
else if (chara.IsMob)
|
||||
{
|
||||
CurrentUMAContainer.CharaData = UmaDatabaseController.ReadCharaData(chara);
|
||||
LoadMobUma(chara, costumeId);
|
||||
}
|
||||
else if (UI.isHeadFix && CurrentHead != null && CurrentHead.chara.IsMob)
|
||||
{
|
||||
CurrentUMAContainer.CharaData = UmaDatabaseController.ReadCharaData(CurrentHead.chara);
|
||||
LoadMobUma(CurrentHead.chara, costumeId, chara.Id);
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadNormalUma(id, costumeId);
|
||||
CurrentUMAContainer.CharaData = UmaDatabaseController.ReadCharaData(chara);
|
||||
LoadNormalUma(chara, costumeId);
|
||||
}
|
||||
|
||||
yield break;
|
||||
}
|
||||
|
||||
private void LoadNormalUma(int id, string costumeId)
|
||||
private void LoadNormalUma(CharaEntry chara, string costumeId)
|
||||
{
|
||||
int id = chara.Id;
|
||||
DataRow charaData = CurrentUMAContainer.CharaData;
|
||||
bool genericCostume = CurrentUMAContainer.IsGeneric = costumeId.Length >= 4;
|
||||
string skin = charaData["skin"].ToString(),
|
||||
height = charaData["height"].ToString(),
|
||||
socks = charaData["socks"].ToString(),
|
||||
bust = charaData["bust"].ToString(),
|
||||
sex = charaData["sex"].ToString(),
|
||||
shape = charaData["shape"].ToString(),
|
||||
costumeIdShort = "";
|
||||
string skin, height, socks, bust, sex, shape, costumeIdShort = "";
|
||||
skin = charaData["skin"].ToString();
|
||||
height = charaData["height"].ToString();
|
||||
socks = charaData["socks"].ToString();
|
||||
bust = charaData["bust"].ToString();
|
||||
sex = charaData["sex"].ToString();
|
||||
shape = charaData["shape"].ToString();
|
||||
|
||||
UmaDatabaseEntry asset = null;
|
||||
if (genericCostume)
|
||||
@@ -160,12 +174,12 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
//Load Physics
|
||||
foreach (var asset1 in UmaViewerMain.Instance.AbChara.Where(a => a.Name.StartsWith(UmaDatabaseController.BodyPath + $"bdy{costumeIdShort}/clothes")))
|
||||
{
|
||||
if (asset1.Name.Contains("cloth00") && asset1.Name.Contains("bust" + bust)&&!physicsloaded)
|
||||
if (asset1.Name.Contains("cloth00") && asset1.Name.Contains("bust" + bust) && !physicsloaded)
|
||||
{
|
||||
RecursiveLoadAsset(asset1);
|
||||
physicsloaded = true;
|
||||
}
|
||||
else if (asset1.Name.Contains("cloth00") && !asset1.Name.Contains("bust")&&!physicsloaded2)
|
||||
else if (asset1.Name.Contains("cloth00") && !asset1.Name.Contains("bust") && !physicsloaded2)
|
||||
{
|
||||
RecursiveLoadAsset(asset1);
|
||||
physicsloaded2 = true;
|
||||
@@ -184,15 +198,11 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Record Head Data
|
||||
int head_id;
|
||||
string head_costumeId;
|
||||
int tailId = Convert.ToInt32(charaData["tail_model_id"]);
|
||||
|
||||
//The tailId of 9006 is 1, but the character has no tail
|
||||
if (id == 9006) tailId = -1;
|
||||
|
||||
if (UI.isHeadFix && CurrentHead != null)
|
||||
{
|
||||
head_id = CurrentHead.id;
|
||||
@@ -208,7 +218,8 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
{
|
||||
id = id,
|
||||
costumeId = costumeId,
|
||||
tailId = tailId
|
||||
tailId = tailId,
|
||||
chara = chara
|
||||
};
|
||||
}
|
||||
|
||||
@@ -359,8 +370,295 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
LoadAsset(UmaViewerMain.Instance.AbMotions.FirstOrDefault(a => a.Name.EndsWith($"anm_eve_chr{id}_00_idle01_loop")));
|
||||
}
|
||||
|
||||
private void LoadMiniUma(int id, string costumeId)
|
||||
private void LoadMobUma(CharaEntry chara, string costumeId, int bodyid = -1)
|
||||
{
|
||||
int id = chara.Id;
|
||||
CurrentUMAContainer.IsMob = chara.IsMob;
|
||||
CurrentUMAContainer.MobDressColor = UmaDatabaseController.ReadMobDressColor(CurrentUMAContainer.CharaData["dress_color_id"].ToString());
|
||||
CurrentUMAContainer.MobHeadColor = UmaDatabaseController.ReadMobHairColor(CurrentUMAContainer.CharaData["chara_hair_color"].ToString());
|
||||
|
||||
DataRow charaData = CurrentUMAContainer.CharaData;
|
||||
bool genericCostume = CurrentUMAContainer.IsGeneric = costumeId.Length >= 4;
|
||||
string skin, height, socks, bust, sex, shape, costumeIdShort = "";
|
||||
string faceid, hairid, personality;
|
||||
|
||||
faceid = charaData["chara_face_model"].ToString();
|
||||
hairid = charaData["chara_hair_model"].ToString();
|
||||
personality = charaData["default_personality"].ToString();
|
||||
skin = charaData["chara_skin_color"].ToString();
|
||||
height = "0";
|
||||
socks = charaData["socks"].ToString();
|
||||
bust = charaData["chara_bust_size"].ToString();
|
||||
sex = charaData["sex"].ToString();
|
||||
shape = "0";
|
||||
|
||||
UmaDatabaseEntry asset = null;
|
||||
if (genericCostume)
|
||||
{
|
||||
costumeIdShort = costumeId.Remove(costumeId.LastIndexOf('_'));
|
||||
CurrentUMAContainer.VarCostumeIdShort = costumeIdShort;
|
||||
CurrentUMAContainer.VarCostumeIdLong = costumeId;
|
||||
CurrentUMAContainer.VarBust = bust;
|
||||
CurrentUMAContainer.VarSkin = skin;
|
||||
CurrentUMAContainer.VarSocks = socks;
|
||||
CurrentUMAContainer.VarHeight = height;
|
||||
|
||||
// Pattern for generic body type is as follows:
|
||||
//
|
||||
// (costume id)_(body_type_sub)_(body_setting)_(height)_(shape)_(bust)
|
||||
//
|
||||
// body_type_sub is used for variants like the summer/winter uniform or the swimsuit/towel
|
||||
// body_setting is used for subvariants of each variant like the big belly version of the uniform, and the genders for the tracksuits
|
||||
//
|
||||
// Some models will naturally be missing due to how this system is designed.
|
||||
|
||||
string body = "";
|
||||
body = UmaDatabaseController.BodyPath + $"bdy{costumeIdShort}/pfb_bdy{costumeId}_{height}_{shape}_{bust}";
|
||||
|
||||
Debug.Log("Looking for " + body);
|
||||
asset = UmaViewerMain.Instance.AbChara.FirstOrDefault(a => a.Name == body);
|
||||
}
|
||||
else asset = UmaViewerMain.Instance.AbChara.FirstOrDefault(a => a.Name == UmaDatabaseController.BodyPath + $"bdy{bodyid}_{costumeId}/pfb_bdy{bodyid}_{costumeId}");
|
||||
|
||||
if (asset == null)
|
||||
{
|
||||
Debug.LogError("No body, can't load!");
|
||||
return;
|
||||
}
|
||||
|
||||
else if (genericCostume)
|
||||
{
|
||||
string texPattern1 = "", texPattern2 = "", texPattern3 = "", texPattern4 = "", texPattern5 = "";
|
||||
switch (costumeId.Split('_')[0])
|
||||
{
|
||||
case "0001":
|
||||
texPattern1 = $"tex_bdy{costumeIdShort}_00_{skin}_{bust}_0{socks}";
|
||||
texPattern2 = $"tex_bdy{costumeIdShort}_00_0_{bust}";
|
||||
texPattern3 = $"tex_bdy{costumeIdShort}_zekken";
|
||||
texPattern4 = $"tex_bdy{costumeIdShort}_00_waku";
|
||||
texPattern5 = $"tex_bdy{costumeIdShort}_num";
|
||||
break;
|
||||
case "0003":
|
||||
texPattern1 = $"tex_bdy{costumeIdShort}_00_{skin}_{bust}";
|
||||
texPattern2 = $"tex_bdy{costumeIdShort}_00_0_{bust}";
|
||||
break;
|
||||
case "0006": //last var is color?
|
||||
texPattern1 = $"tex_bdy{costumeId}_{skin}_{bust}_0{0}";
|
||||
texPattern2 = $"tex_bdy{costumeId}_0_{bust}_00_";
|
||||
break;
|
||||
default:
|
||||
texPattern1 = $"tex_bdy{costumeId}_{skin}_{bust}";
|
||||
texPattern2 = $"tex_bdy{costumeId}_0_{bust}";
|
||||
break;
|
||||
}
|
||||
Debug.Log(texPattern1 + " " + texPattern2);
|
||||
//Load Body Textures
|
||||
foreach (var asset1 in UmaViewerMain.Instance.AbChara.Where(a => a.Name.StartsWith(UmaDatabaseController.BodyPath)
|
||||
&& (a.Name.Contains(texPattern1)
|
||||
|| a.Name.Contains(texPattern2)
|
||||
|| (string.IsNullOrEmpty(texPattern3) ? false : a.Name.Contains(texPattern3))
|
||||
|| (string.IsNullOrEmpty(texPattern4) ? false : a.Name.Contains(texPattern4))
|
||||
|| (string.IsNullOrEmpty(texPattern5) ? false : a.Name.Contains(texPattern5)))))
|
||||
{
|
||||
RecursiveLoadAsset(asset1);
|
||||
}
|
||||
//Load Body
|
||||
RecursiveLoadAsset(asset);
|
||||
|
||||
bool physicsloaded = false, physicsloaded2 = false;
|
||||
//Load Physics
|
||||
foreach (var asset1 in UmaViewerMain.Instance.AbChara.Where(a => a.Name.StartsWith(UmaDatabaseController.BodyPath + $"bdy{costumeIdShort}/clothes")))
|
||||
{
|
||||
if (asset1.Name.Contains("cloth00") && asset1.Name.Contains("bust" + bust) && !physicsloaded)
|
||||
{
|
||||
RecursiveLoadAsset(asset1);
|
||||
physicsloaded = true;
|
||||
}
|
||||
else if (asset1.Name.Contains("cloth00") && !asset1.Name.Contains("bust") && !physicsloaded2)
|
||||
{
|
||||
RecursiveLoadAsset(asset1);
|
||||
physicsloaded2 = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
RecursiveLoadAsset(asset);
|
||||
|
||||
//Load Physics
|
||||
foreach (var asset1 in UmaViewerMain.Instance.AbChara.Where(a => a.Name.StartsWith(UmaDatabaseController.BodyPath + $"bdy{bodyid}_{costumeId}/clothes")))
|
||||
{
|
||||
if (asset1.Name.Contains("cloth00"))
|
||||
RecursiveLoadAsset(asset1);
|
||||
}
|
||||
}
|
||||
|
||||
// Record Head Data
|
||||
int head_id = 1;
|
||||
string head_costumeId = "00";
|
||||
int tailId = 1;
|
||||
|
||||
CurrentHead = new UmaHeadData
|
||||
{
|
||||
id = id,
|
||||
costumeId = costumeId,
|
||||
tailId = tailId,
|
||||
chara = chara
|
||||
};
|
||||
|
||||
var head_s = head_id.ToString().PadLeft(4, '0');
|
||||
string head = UmaDatabaseController.HeadPath + $"chr{head_s}_{head_costumeId}/pfb_chr{head_s}_{head_costumeId}_face{faceid.PadLeft(3, '0')}";
|
||||
string hair = UmaDatabaseController.HeadPath + $"chr{head_s}_{head_costumeId}/pfb_chr{head_s}_{head_costumeId}_hair{hairid.PadLeft(3, '0')}";
|
||||
asset = UmaViewerMain.Instance.AbChara.FirstOrDefault(a => a.Name == head);
|
||||
var hairasset = UmaViewerMain.Instance.AbChara.FirstOrDefault(a => a.Name == hair);
|
||||
bool isDefaultHead = true;
|
||||
|
||||
|
||||
if (asset != null && hairasset != null)
|
||||
{
|
||||
//Load Face And Hair Textures
|
||||
foreach (var asset1 in UmaViewerMain.Instance.AbChara.Where(a => a.Name.StartsWith($"{UmaDatabaseController.HeadPath}chr{head_s}_{head_costumeId}/textures")))
|
||||
{
|
||||
if (asset1.Name.Contains($"tex_chr{head_s}_{head_costumeId}_face{faceid.PadLeft(3, '0')}_0")
|
||||
|| asset1.Name.Contains($"tex_chr{head_s}_{head_costumeId}_face{faceid.PadLeft(3, '0')}_{skin}"))
|
||||
{
|
||||
RecursiveLoadAsset(asset1);
|
||||
}
|
||||
|
||||
if (asset1.Name.Contains($"tex_chr{head_s}_{head_costumeId}_hair{hairid.PadLeft(3, '0')}"))
|
||||
{
|
||||
RecursiveLoadAsset(asset1);
|
||||
}
|
||||
}
|
||||
|
||||
//Load face
|
||||
RecursiveLoadAsset(asset);
|
||||
//Load hair
|
||||
RecursiveLoadAsset(hairasset);
|
||||
|
||||
CurrentUMAContainer.MergeHairModel();
|
||||
|
||||
//Load Physics
|
||||
if (isDefaultHead)
|
||||
{
|
||||
foreach (var asset1 in UmaViewerMain.Instance.AbChara.Where(a => a.Name.StartsWith($"{UmaDatabaseController.HeadPath}chr{head_s}_00/clothes")))
|
||||
{
|
||||
if (asset1.Name.Contains($"hair{hairid.PadLeft(3, '0')}_cloth00"))
|
||||
RecursiveLoadAsset(asset1);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (tailId != 0)
|
||||
{
|
||||
string tailName = $"tail{tailId.ToString().PadLeft(4, '0')}_00";
|
||||
string tailPath = $"3d/chara/tail/{tailName}/";
|
||||
string tailPfb = tailPath + $"pfb_{tailName}";
|
||||
asset = UmaViewerMain.Instance.AbChara.FirstOrDefault(a => a.Name == tailPfb);
|
||||
if (asset != null)
|
||||
{
|
||||
foreach (var asset1 in UmaViewerMain.Instance.AbChara.Where(a => a.Name.StartsWith($"{tailPath}textures/tex_{tailName}_{head_s}") || a.Name.StartsWith($"{tailPath}textures/tex_{tailName}_0000")))
|
||||
{
|
||||
RecursiveLoadAsset(asset1);
|
||||
}
|
||||
RecursiveLoadAsset(asset);
|
||||
|
||||
|
||||
//Load Physics
|
||||
foreach (var asset1 in UmaViewerMain.Instance.AbChara.Where(a => a.Name.StartsWith($"{tailPath}clothes")))
|
||||
{
|
||||
if (asset1.Name.Contains("cloth00"))
|
||||
RecursiveLoadAsset(asset1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("no tail");
|
||||
}
|
||||
}
|
||||
|
||||
CurrentUMAContainer.LoadPhysics(); //Need to load physics before loading FacialMorph
|
||||
|
||||
//Load FacialMorph
|
||||
if (CurrentUMAContainer.Head)
|
||||
{
|
||||
var locatorEntry = Main.AbList.FirstOrDefault(a => a.Name.EndsWith("3d/animator/drivenkeylocator"));
|
||||
var bundle = AssetBundle.LoadFromFile(locatorEntry.FilePath);
|
||||
Main.LoadedBundles.Add(locatorEntry.Name, bundle);
|
||||
var locator = Instantiate(bundle.LoadAsset("DrivenKeyLocator"), CurrentUMAContainer.transform) as GameObject;
|
||||
locator.name = "DrivenKeyLocator";
|
||||
|
||||
var headBone = (GameObject)CurrentUMAContainer.Head.GetComponent<AssetHolder>()._assetTable["head"];
|
||||
var eyeLocator_L = headBone.transform.Find("Eye_target_locator_L");
|
||||
var eyeLocator_R = headBone.transform.Find("Eye_target_locator_R");
|
||||
|
||||
var mangaEntry = Main.AbEffect.FindAll(a => a.Name.StartsWith("3d/effect/charaemotion/pfb_eff_chr_emo_eye"));
|
||||
var mangaObjects = new List<GameObject>();
|
||||
mangaEntry.ForEach(entry =>
|
||||
{
|
||||
AssetBundle ab = AssetBundle.LoadFromFile(entry.FilePath);
|
||||
Main.LoadedBundles.Add(entry.Name, ab);
|
||||
var obj = ab.LoadAsset(Path.GetFileNameWithoutExtension(entry.Name)) as GameObject;
|
||||
obj.SetActive(false);
|
||||
|
||||
var leftObj = Instantiate(obj, eyeLocator_L.transform);
|
||||
new List<Renderer>(leftObj.GetComponentsInChildren<Renderer>()).ForEach(a => a.material.renderQueue = -1);
|
||||
CurrentUMAContainer.LeftMangaObject.Add(leftObj);
|
||||
|
||||
var RightObj = Instantiate(obj, eyeLocator_R.transform);
|
||||
if (RightObj.TryGetComponent<AssetHolder>(out var holder))
|
||||
{
|
||||
if (holder._assetTableValue["invert"] > 0)
|
||||
RightObj.transform.localScale = new Vector3(-1, 1, 1);
|
||||
}
|
||||
new List<Renderer>(RightObj.GetComponentsInChildren<Renderer>()).ForEach(a => { a.material.renderQueue = -1; });
|
||||
CurrentUMAContainer.RightMangaObject.Add(RightObj);
|
||||
});
|
||||
|
||||
var tearEntry = Main.AbChara.FindAll(a => a.Name.StartsWith("3d/chara/common/tear/") && a.Name.Contains("pfb_chr_tear"));
|
||||
if (tearEntry.Count > 0)
|
||||
{
|
||||
tearEntry.ForEach(a => RecursiveLoadAsset(a));
|
||||
}
|
||||
if (CurrentUMAContainer.TearPrefab_0 && CurrentUMAContainer.TearPrefab_1)
|
||||
{
|
||||
var p0 = CurrentUMAContainer.TearPrefab_0;
|
||||
var p1 = CurrentUMAContainer.TearPrefab_1;
|
||||
var t = headBone.transform;
|
||||
CurrentUMAContainer.TearControllers.Add(new TearController(t, Instantiate(p0, t), Instantiate(p1, t), 0, 1));
|
||||
CurrentUMAContainer.TearControllers.Add(new TearController(t, Instantiate(p0, t), Instantiate(p1, t), 1, 1));
|
||||
CurrentUMAContainer.TearControllers.Add(new TearController(t, Instantiate(p0, t), Instantiate(p1, t), 0, 0));
|
||||
CurrentUMAContainer.TearControllers.Add(new TearController(t, Instantiate(p0, t), Instantiate(p1, t), 1, 0));
|
||||
}
|
||||
|
||||
var firsehead = CurrentUMAContainer.Head;
|
||||
var faceDriven = firsehead.GetComponent<AssetHolder>()._assetTable["facial_target"] as FaceDrivenKeyTarget;
|
||||
var earDriven = firsehead.GetComponent<AssetHolder>()._assetTable["ear_target"] as DrivenKeyTarget;
|
||||
faceDriven._earTarget = earDriven._targetFaces;
|
||||
CurrentUMAContainer.FaceDrivenKeyTarget = faceDriven;
|
||||
CurrentUMAContainer.FaceDrivenKeyTarget.Container = CurrentUMAContainer;
|
||||
faceDriven.DrivenKeyLocator = locator.transform;
|
||||
faceDriven.Initialize(firsehead.GetComponentsInChildren<Transform>().ToList());
|
||||
|
||||
var emotionDriven = ScriptableObject.CreateInstance<FaceEmotionKeyTarget>();
|
||||
emotionDriven.name = $"char{id}_{costumeId}_emotion_target";
|
||||
CurrentUMAContainer.FaceEmotionKeyTarget = emotionDriven;
|
||||
emotionDriven.FaceDrivenKeyTarget = faceDriven;
|
||||
emotionDriven.FaceEmotionKey = UmaDatabaseController.Instance.FaceTypeData.ToList();
|
||||
emotionDriven.Initialize();
|
||||
}
|
||||
|
||||
CurrentUMAContainer.TearControllers.ForEach(a => a.SetDir(a.CurrentDir));
|
||||
CurrentUMAContainer.HeadBone = (GameObject)CurrentUMAContainer.Body.GetComponent<AssetHolder>()._assetTable["head"];
|
||||
CurrentUMAContainer.EyeHeight = CurrentUMAContainer.Head.GetComponent<AssetHolder>()._assetTableValue["head_center_offset_y"];
|
||||
CurrentUMAContainer.MergeModel();
|
||||
CurrentUMAContainer.Initialize();
|
||||
CurrentUMAContainer.SetHeight(-1);
|
||||
LoadAsset(UmaViewerMain.Instance.AbMotions.FirstOrDefault(a => a.Name.EndsWith($"homestand{personality.PadLeft(2,'0')}_loop")));
|
||||
}
|
||||
|
||||
private void LoadMiniUma(CharaEntry chara, string costumeId)
|
||||
{
|
||||
int id = chara.Id;
|
||||
DataRow charaData = CurrentUMAContainer.CharaData;
|
||||
CurrentUMAContainer.IsMini = true;
|
||||
bool isGeneric = CurrentUMAContainer.IsGeneric = costumeId.Length >= 4;
|
||||
@@ -469,11 +767,13 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
RecursiveLoadAsset(entry);
|
||||
}
|
||||
|
||||
public void LoadLive(LiveEntry live,List<LiveCharacterSelect> characters)
|
||||
public void LoadLive(LiveEntry live, List<LiveCharacterSelect> characters)
|
||||
{
|
||||
characters.ForEach(a => {
|
||||
if (a.CharaId == 0 || a.CostumeId == "") {
|
||||
a.CharaId = Main.Characters[Random.Range(0, Main.Characters.Count)].Id;
|
||||
characters.ForEach(a =>
|
||||
{
|
||||
if (a.CharaEntry == null || a.CostumeId == "")
|
||||
{
|
||||
a.CharaEntry = Main.Characters[Random.Range(0, Main.Characters.Count)];
|
||||
a.CostumeId = "00";
|
||||
}
|
||||
});//fill empty
|
||||
@@ -553,7 +853,7 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
Destroy(tmp.gameObject);
|
||||
UI.ResetAudioPlayer();
|
||||
}
|
||||
if(subindex == -1)
|
||||
if (subindex == -1)
|
||||
{
|
||||
foreach (AudioClip clip in LoadAudio(SongAwb))
|
||||
{
|
||||
@@ -564,7 +864,7 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
{
|
||||
AddAudioSource(LoadAudio(SongAwb)[subindex]);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void AddAudioSource(AudioClip clip)
|
||||
@@ -768,7 +1068,14 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
}
|
||||
else if (bundle.name.Contains("/head/"))
|
||||
{
|
||||
LoadHead(go);
|
||||
if (bundle.name.Contains("_hair")&&!bundle.name.Contains("mchr"))
|
||||
{
|
||||
LoadHair(go);
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadHead(go);
|
||||
}
|
||||
}
|
||||
else if (bundle.name.Contains("/body/"))
|
||||
{
|
||||
@@ -808,6 +1115,11 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
{
|
||||
CurrentUMAContainer.GenericBodyTextures.Add(tex2D);
|
||||
}
|
||||
else if (bundle.name.Contains("_face")|| bundle.name.Contains("_hair"))
|
||||
{
|
||||
if(CurrentUMAContainer.IsMob)
|
||||
CurrentUMAContainer.MobHeadTextures.Add(tex2D);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -845,27 +1157,40 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
|
||||
if (CurrentUMAContainer.IsMini)
|
||||
{
|
||||
|
||||
m.SetTexture("_MainTex", textures[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
//BodyAlapha's shader need to change manually.
|
||||
if (m.name.Contains("bdy") && m.name.Contains("Alpha"))
|
||||
{
|
||||
m.shader = bodyAlphaShader;
|
||||
}
|
||||
|
||||
|
||||
if (m.shader.name.Contains("Noline")&& m.shader.name.Contains("TSER"))
|
||||
if (m.shader.name.Contains("Noline") && m.shader.name.Contains("TSER"))
|
||||
{
|
||||
var s = ShaderList.Find(a=>a.name == m.shader.name.Replace("Noline", "")); //Generic costume shader need to change manually.
|
||||
var s = ShaderList.Find(a => a.name == m.shader.name.Replace("Noline", "")); //Generic costume shader need to change manually.
|
||||
if (s)
|
||||
{
|
||||
m.shader = s;
|
||||
}
|
||||
}
|
||||
|
||||
//BodyAlapha's shader need to change manually.
|
||||
if (m.name.Contains("bdy"))
|
||||
{
|
||||
if (m.name.Contains("Alpha"))
|
||||
{
|
||||
m.shader = bodyAlphaShader;
|
||||
}
|
||||
else
|
||||
{
|
||||
//some costume use area texture
|
||||
var areaTex = UmaViewerMain.Instance.AbChara.FirstOrDefault(a => a.Name.StartsWith(UmaDatabaseController.BodyPath + $"bdy{costumeIdShort}/textures") && a.Name.EndsWith("area"));
|
||||
if (areaTex != null)
|
||||
{
|
||||
RecursiveLoadAsset(areaTex);
|
||||
m.SetTexture("_MaskColorTex", textures.FirstOrDefault(t => t.name.Contains(costumeIdShort) && t.name.EndsWith("area")));
|
||||
SetMaskColor(m, CurrentUMAContainer.IsMob ? CurrentUMAContainer.MobDressColor : CurrentUMAContainer.CharaData, CurrentUMAContainer.IsMob);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch (costumeIdShort.Split('_')[0]) //costume ID
|
||||
{
|
||||
case "0001":
|
||||
@@ -918,7 +1243,6 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
tripleMap = $"tex_bdy{costumeIdLong}_0_{bust}_base";
|
||||
optionMap = $"tex_bdy{costumeIdLong}_0_{bust}_ctrl";
|
||||
break;
|
||||
|
||||
}
|
||||
Debug.Log("Looking for texture " + mainTex);
|
||||
m.SetTexture("_MainTex", textures.FirstOrDefault(t => t.name == mainTex));
|
||||
@@ -950,6 +1274,8 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
|
||||
private void LoadHead(GameObject go)
|
||||
{
|
||||
var isMob = CurrentUMAContainer.IsMob;
|
||||
var textures = CurrentUMAContainer.MobHeadTextures;
|
||||
GameObject head = Instantiate(go, CurrentUMAContainer.transform);
|
||||
CurrentUMAContainer.Head = head;
|
||||
|
||||
@@ -990,6 +1316,34 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isMob)
|
||||
{
|
||||
if (m.name.EndsWith("eye"))
|
||||
{
|
||||
m.SetTexture("_MainTex", textures.LastOrDefault(t => t.name.Contains("_eye") && t.name.EndsWith("eye0")));
|
||||
m.SetTexture("_High0Tex", textures.LastOrDefault(t => t.name.Contains("_eye") && t.name.EndsWith("hi00")));
|
||||
m.SetTexture("_High1Tex", textures.LastOrDefault(t => t.name.Contains("_eye") && t.name.EndsWith("hi01")));
|
||||
m.SetTexture("_High2Tex", textures.LastOrDefault(t => t.name.Contains("_eye") && t.name.EndsWith("hi02")));
|
||||
m.SetTexture("_MaskColorTex", textures.LastOrDefault(t => t.name.Contains("_eye") && t.name.EndsWith("area")));
|
||||
SetMaskColor(m, CurrentUMAContainer.MobHeadColor, "eye", false);
|
||||
}
|
||||
if (m.name.EndsWith("face"))
|
||||
{
|
||||
m.SetTexture("_MainTex", textures.LastOrDefault(t => t.name.Contains("_face") && t.name.EndsWith("diff")));
|
||||
m.SetTexture("_ToonMap", textures.LastOrDefault(t => t.name.Contains("_face") && t.name.EndsWith("shad_c")));
|
||||
m.SetTexture("_TripleMaskMap", textures.LastOrDefault(t => t.name.Contains("_face") && t.name.EndsWith("base")));
|
||||
m.SetTexture("_OptionMaskMap", textures.LastOrDefault(t => t.name.Contains("_face") && t.name.EndsWith("ctrl")));
|
||||
m.SetTexture("_MaskColorTex", textures.LastOrDefault(t => t.name.Contains("_face") && t.name.EndsWith("area")&&! t.name.Contains("_eye")));
|
||||
SetMaskColor(m, CurrentUMAContainer.MobHeadColor, "mayu", true);
|
||||
}
|
||||
if (m.name.EndsWith("mayu"))
|
||||
{
|
||||
m.SetTexture("_MainTex", textures.LastOrDefault(t => t.name.Contains("_face") && t.name.EndsWith("diff")));
|
||||
m.SetTexture("_MaskColorTex", textures.LastOrDefault(t => t.name.Contains("_face") && t.name.EndsWith("area") && !t.name.Contains("_eye")));
|
||||
SetMaskColor(m, CurrentUMAContainer.MobHeadColor, "mayu", true);
|
||||
}
|
||||
}
|
||||
|
||||
//Glasses's shader need to change manually.
|
||||
if (r.name.Contains("Hair") && r.name.Contains("Alpha"))
|
||||
{
|
||||
@@ -999,10 +1353,17 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
//Blush Setting
|
||||
if (r.name.Contains("Cheek"))
|
||||
{
|
||||
var table = CurrentUMAContainer.Head.GetComponent<AssetHolder>()._assetTable.list;
|
||||
CurrentUMAContainer.CheekTex_0 = table.FindLast(a => a.Key.Equals("cheek0")).Value as Texture;
|
||||
CurrentUMAContainer.CheekTex_1 = table.FindLast(a => a.Key.Equals("cheek1")).Value as Texture;
|
||||
CurrentUMAContainer.CheekTex_2 = table.FindLast(a => a.Key.Equals("cheek2")).Value as Texture;
|
||||
if (isMob)
|
||||
{
|
||||
CurrentUMAContainer.CheekTex_0 = CurrentUMAContainer.MobHeadTextures.FindLast(a=>a.name.Contains("cheek0"));
|
||||
CurrentUMAContainer.CheekTex_1 = CurrentUMAContainer.MobHeadTextures.FindLast(a => a.name.Contains("cheek1"));
|
||||
}
|
||||
else
|
||||
{
|
||||
var table = CurrentUMAContainer.Head.GetComponent<AssetHolder>()._assetTable;
|
||||
CurrentUMAContainer.CheekTex_0 = table["cheek0"] as Texture;
|
||||
CurrentUMAContainer.CheekTex_1 = table["cheek1"] as Texture;
|
||||
}
|
||||
}
|
||||
switch (m.shader.name)
|
||||
{
|
||||
@@ -1033,11 +1394,47 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//foreach (var anim in Main.AbList.Where(a => a.Name.StartsWith("3d/chara/head/chr0001_00/facial/")))
|
||||
//{
|
||||
// RecursiveLoadAsset(anim);
|
||||
//}
|
||||
private void LoadHair(GameObject go)
|
||||
{
|
||||
GameObject hair = Instantiate(go, CurrentUMAContainer.transform);
|
||||
CurrentUMAContainer.Hair = hair;
|
||||
var textures = CurrentUMAContainer.MobHeadTextures;
|
||||
foreach (Renderer r in hair.GetComponentsInChildren<Renderer>())
|
||||
{
|
||||
foreach (Material m in r.sharedMaterials)
|
||||
{
|
||||
|
||||
//Glasses's shader need to change manually.
|
||||
if (r.name.Contains("Hair") && r.name.Contains("Alpha"))
|
||||
{
|
||||
m.shader = alphaShader;
|
||||
}
|
||||
|
||||
if(m.name.EndsWith("_hair"))
|
||||
{
|
||||
m.SetTexture("_MainTex", textures.FirstOrDefault(t => t.name.Contains("_hair") && t.name.EndsWith("diff")));
|
||||
m.SetTexture("_ToonMap", textures.FirstOrDefault(t => t.name.Contains("_hair") && t.name.EndsWith("shad_c")));
|
||||
m.SetTexture("_TripleMaskMap", textures.FirstOrDefault(t => t.name.Contains("_hair") && t.name.EndsWith("base")));
|
||||
m.SetTexture("_OptionMaskMap", textures.FirstOrDefault(t => t.name.Contains("_hair") && t.name.EndsWith("ctrl")));
|
||||
m.SetTexture("_MaskColorTex", textures.FirstOrDefault(t => t.name.Contains("_hair") && t.name.EndsWith("area")));
|
||||
SetMaskColor(m, CurrentUMAContainer.MobHeadColor, "hair", true);
|
||||
}
|
||||
|
||||
switch (m.shader.name)
|
||||
{
|
||||
case "Gallop/3D/Chara/ToonHair/TSER":
|
||||
m.shader = hairShader;
|
||||
m.SetFloat("_CylinderBlend", 0.25f);
|
||||
break;
|
||||
default:
|
||||
Debug.Log(m.shader.name);
|
||||
// m.shader = Shader.Find("Nars/UmaMusume/Body");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadTail(GameObject go)
|
||||
@@ -1052,6 +1449,10 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
m.SetTexture("_ToonMap", textures.FirstOrDefault(t => t.name.Contains("shad")));
|
||||
m.SetTexture("_TripleMaskMap", textures.FirstOrDefault(t => t.name.Contains("base")));
|
||||
m.SetTexture("_OptionMaskMap", textures.FirstOrDefault(t => t.name.Contains("ctrl")));
|
||||
if (CurrentUMAContainer.IsMob)
|
||||
{
|
||||
SetMaskColor(m, CurrentUMAContainer.MobHeadColor, "tail", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1287,8 +1688,8 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
|
||||
foreach (var bundle in Main.LoadedBundles)
|
||||
{
|
||||
if(bundle.Value)
|
||||
bundle.Value.Unload(unloadAllObjects);
|
||||
if (bundle.Value)
|
||||
bundle.Value.Unload(unloadAllObjects);
|
||||
}
|
||||
if (unloadAllObjects)
|
||||
{
|
||||
@@ -1319,6 +1720,26 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
return null;
|
||||
}
|
||||
|
||||
public Sprite LoadMobCharaIcon(string id)
|
||||
{
|
||||
string value = $"mob/mob_chr_icon_{id}_000001_01";
|
||||
var entry = UmaViewerMain.Instance.AbList.FirstOrDefault(a => a.Name.Equals(value));
|
||||
if (entry == null) { return null; }
|
||||
string path = entry.FilePath;
|
||||
if (File.Exists(path))
|
||||
{
|
||||
AssetBundle assetBundle = AssetBundle.LoadFromFile(path);
|
||||
if (assetBundle.Contains($"mob_chr_icon_{id}_000001_01"))
|
||||
{
|
||||
Texture2D texture = (Texture2D)assetBundle.LoadAsset($"mob_chr_icon_{id}_000001_01");
|
||||
Sprite sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), Vector2.zero);
|
||||
assetBundle.Unload(false);
|
||||
return sprite;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Sprite LoadSprite(UmaDatabaseEntry item)
|
||||
{
|
||||
string path = item.FilePath;
|
||||
@@ -1337,7 +1758,7 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
{
|
||||
string value = $"live/jacket/jacket_icon_l_{musicid}";
|
||||
var entry = UmaViewerMain.Instance.AbList.FirstOrDefault(a => a.Name.Equals(value));
|
||||
if(entry == null) return null;
|
||||
if (entry == null) return null;
|
||||
string path = entry.FilePath;
|
||||
if (File.Exists(path))
|
||||
{
|
||||
@@ -1403,6 +1824,89 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
private void SetMaskColor(Material mat, DataRow colordata, bool IsMob)
|
||||
{
|
||||
mat.EnableKeyword("USE_MASK_COLOR");
|
||||
Color c1, c2, c3, c4, c5, c6, t1, t2, t3, t4, t5, t6;
|
||||
if (IsMob)
|
||||
{
|
||||
ColorUtility.TryParseHtmlString(colordata["color_r1"].ToString(), out c1);
|
||||
ColorUtility.TryParseHtmlString(colordata["color_r2"].ToString(), out c2);
|
||||
ColorUtility.TryParseHtmlString(colordata["color_g1"].ToString(), out c3);
|
||||
ColorUtility.TryParseHtmlString(colordata["color_g2"].ToString(), out c4);
|
||||
ColorUtility.TryParseHtmlString(colordata["color_b1"].ToString(), out c5);
|
||||
ColorUtility.TryParseHtmlString(colordata["color_b2"].ToString(), out c6);
|
||||
ColorUtility.TryParseHtmlString(colordata["toon_color_r1"].ToString(), out t1);
|
||||
ColorUtility.TryParseHtmlString(colordata["toon_color_r2"].ToString(), out t2);
|
||||
ColorUtility.TryParseHtmlString(colordata["toon_color_g1"].ToString(), out t3);
|
||||
ColorUtility.TryParseHtmlString(colordata["toon_color_g2"].ToString(), out t4);
|
||||
ColorUtility.TryParseHtmlString(colordata["toon_color_b1"].ToString(), out t5);
|
||||
ColorUtility.TryParseHtmlString(colordata["toon_color_b2"].ToString(), out t6);
|
||||
}
|
||||
else
|
||||
{
|
||||
ColorUtility.TryParseHtmlString("#" + colordata["image_color_main"].ToString(), out c1);
|
||||
ColorUtility.TryParseHtmlString("#" + colordata["image_color_sub"].ToString(), out c2);
|
||||
ColorUtility.TryParseHtmlString("#" + colordata["ui_color_sub"].ToString(), out c3);
|
||||
ColorUtility.TryParseHtmlString("#" + colordata["ui_color_sub"].ToString(), out c4);
|
||||
ColorUtility.TryParseHtmlString("#" + colordata["ui_training_color_1"].ToString(), out c5);
|
||||
ColorUtility.TryParseHtmlString("#" + colordata["ui_training_color_2"].ToString(), out c6);
|
||||
float toonstrength = 0.8f;
|
||||
t1 = c1 * toonstrength;
|
||||
t2 = c2 * toonstrength;
|
||||
t3 = c3 * toonstrength;
|
||||
t4 = c4 * toonstrength;
|
||||
t5 = c5 * toonstrength;
|
||||
t6 = c6 * toonstrength;
|
||||
}
|
||||
|
||||
mat.SetColor("_MaskColorR1", c1);
|
||||
mat.SetColor("_MaskColorR2", c2);
|
||||
mat.SetColor("_MaskColorG1", c3);
|
||||
mat.SetColor("_MaskColorG2", c4);
|
||||
mat.SetColor("_MaskColorB1", c5);
|
||||
mat.SetColor("_MaskColorB2", c6);
|
||||
mat.SetColor("_MaskToonColorR1", t1);
|
||||
mat.SetColor("_MaskToonColorR2", t2);
|
||||
mat.SetColor("_MaskToonColorG1", t3);
|
||||
mat.SetColor("_MaskToonColorG2", t4);
|
||||
mat.SetColor("_MaskToonColorB1", t5);
|
||||
mat.SetColor("_MaskToonColorB2", t6);
|
||||
}
|
||||
|
||||
private void SetMaskColor(Material mat, DataRow colordata, string prefix,bool hastoon)
|
||||
{
|
||||
mat.EnableKeyword("USE_MASK_COLOR");
|
||||
Color c1, c2, c3, c4, c5, c6, t1, t2, t3, t4, t5, t6;
|
||||
ColorUtility.TryParseHtmlString(colordata[$"{prefix}_color_r1"].ToString(), out c1);
|
||||
ColorUtility.TryParseHtmlString(colordata[$"{prefix}_color_r2"].ToString(), out c2);
|
||||
ColorUtility.TryParseHtmlString(colordata[$"{prefix}_color_g1"].ToString(), out c3);
|
||||
ColorUtility.TryParseHtmlString(colordata[$"{prefix}_color_g2"].ToString(), out c4);
|
||||
ColorUtility.TryParseHtmlString(colordata[$"{prefix}_color_b1"].ToString(), out c5);
|
||||
ColorUtility.TryParseHtmlString(colordata[$"{prefix}_color_b2"].ToString(), out c6);
|
||||
mat.SetColor("_MaskColorR1", c1);
|
||||
mat.SetColor("_MaskColorR2", c2);
|
||||
mat.SetColor("_MaskColorG1", c3);
|
||||
mat.SetColor("_MaskColorG2", c4);
|
||||
mat.SetColor("_MaskColorB1", c5);
|
||||
mat.SetColor("_MaskColorB2", c6);
|
||||
if (hastoon)
|
||||
{
|
||||
ColorUtility.TryParseHtmlString(colordata[$"{prefix}_toon_color_r1"].ToString(), out t1);
|
||||
ColorUtility.TryParseHtmlString(colordata[$"{prefix}_toon_color_r2"].ToString(), out t2);
|
||||
ColorUtility.TryParseHtmlString(colordata[$"{prefix}_toon_color_g1"].ToString(), out t3);
|
||||
ColorUtility.TryParseHtmlString(colordata[$"{prefix}_toon_color_g2"].ToString(), out t4);
|
||||
ColorUtility.TryParseHtmlString(colordata[$"{prefix}_toon_color_b1"].ToString(), out t5);
|
||||
ColorUtility.TryParseHtmlString(colordata[$"{prefix}_toon_color_b2"].ToString(), out t6);
|
||||
mat.SetColor("_MaskToonColorR1", t1);
|
||||
mat.SetColor("_MaskToonColorR2", t2);
|
||||
mat.SetColor("_MaskToonColorG1", t3);
|
||||
mat.SetColor("_MaskToonColorG2", t4);
|
||||
mat.SetColor("_MaskToonColorB1", t5);
|
||||
mat.SetColor("_MaskToonColorB2", t6);
|
||||
}
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
if (AnimationCamera && AnimationCamera.enabled == true)
|
||||
|
||||
@@ -82,7 +82,19 @@ public class UmaViewerMain : MonoBehaviour
|
||||
var MobCharaData = UmaDatabaseController.Instance.MobCharaData;
|
||||
foreach (var item in MobCharaData)
|
||||
{
|
||||
//WIP
|
||||
if (Convert.ToInt32(item["use_live"]) == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var id = Convert.ToInt32(item["mob_id"]);
|
||||
MobCharacters.Add(new CharaEntry()
|
||||
{
|
||||
Name = $"Mob_{id}",
|
||||
Icon = UmaViewerBuilder.Instance.LoadMobCharaIcon(id.ToString()),
|
||||
Id = id,
|
||||
IsMob = true
|
||||
});
|
||||
}
|
||||
|
||||
foreach (var item in CostumeList)
|
||||
|
||||
@@ -20,7 +20,10 @@ public class UmaViewerUI : MonoBehaviour
|
||||
|
||||
[Header("normal models")]
|
||||
public ScrollRect CharactersList;
|
||||
public ScrollRect MobCharactersList;
|
||||
public PageManager MobCharactersPageCtrl;
|
||||
public ScrollRect CostumeList;
|
||||
public ScrollRect MobCostumeList;
|
||||
public ScrollRect AnimationSetList;
|
||||
public ScrollRect AnimationList;
|
||||
public PageManager AnimationPageCtrl;
|
||||
@@ -260,6 +263,26 @@ public class UmaViewerUI : MonoBehaviour
|
||||
container4.Image.enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
var pageentrys = new List<PageManager.Entry>();
|
||||
foreach (var chara in Main.MobCharacters.OrderBy(c => c.Id))
|
||||
{
|
||||
var charaInstance = chara;
|
||||
var pageentry = new PageManager.Entry();
|
||||
|
||||
pageentry.Name = chara.Name;
|
||||
pageentry.OnClick = (container) =>
|
||||
{
|
||||
HighlightChildImage(MobCharactersList.content, container);
|
||||
ListCostumes(charaInstance, false);
|
||||
};
|
||||
if (chara.Icon)
|
||||
{
|
||||
pageentry.Sprite = chara.Icon;
|
||||
}
|
||||
pageentrys.Add(pageentry);
|
||||
}
|
||||
MobCharactersPageCtrl.Initialize(pageentrys, MobCharactersList);
|
||||
}
|
||||
|
||||
public void LoadMiniModelPanels()
|
||||
@@ -585,7 +608,7 @@ public class UmaViewerUI : MonoBehaviour
|
||||
|
||||
void ListCostumes(CharaEntry chara, bool mini)
|
||||
{
|
||||
ScrollRect costumeList = mini ? MiniCostumeList : CostumeList;
|
||||
ScrollRect costumeList = mini ? MiniCostumeList : chara.IsMob ? MobCostumeList : CostumeList;
|
||||
for (int i = costumeList.content.childCount - 1; i >= 0; i--)
|
||||
{
|
||||
Destroy(costumeList.content.GetChild(i).gameObject);
|
||||
@@ -607,25 +630,18 @@ public class UmaViewerUI : MonoBehaviour
|
||||
{
|
||||
if (LiveSelectPannel.activeInHierarchy && CurrentSeletChara)
|
||||
{
|
||||
CurrentSeletChara.SetValue(achara.Id, costumeId, achara.Icon, container.Image.sprite);
|
||||
CurrentSeletChara.SetValue(achara, costumeId, container.Image.sprite);
|
||||
}
|
||||
else
|
||||
{
|
||||
HighlightChildImage(costumeList.content, container);
|
||||
StartCoroutine(Builder.LoadUma(achara.Id, costumeId, mini));
|
||||
StartCoroutine(Builder.LoadUma(achara, costumeId, mini));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
if(chara == null)
|
||||
{
|
||||
foreach(var cha in Main.Characters)
|
||||
{
|
||||
action.Invoke(cha);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (!chara.IsMob)
|
||||
{
|
||||
action.Invoke(chara);
|
||||
}
|
||||
@@ -654,12 +670,12 @@ public class UmaViewerUI : MonoBehaviour
|
||||
{
|
||||
if (LiveSelectPannel.activeInHierarchy && CurrentSeletChara)
|
||||
{
|
||||
CurrentSeletChara.SetValue(chara.Id, costumeId, chara.Icon, container.Image.sprite);
|
||||
CurrentSeletChara.SetValue(chara, costumeId, container.Image.sprite);
|
||||
}
|
||||
else
|
||||
{
|
||||
HighlightChildImage(costumeList.content, container);
|
||||
StartCoroutine(Builder.LoadUma(chara.Id, costumeId, mini));
|
||||
StartCoroutine(Builder.LoadUma(chara, costumeId, mini));
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -891,7 +907,7 @@ public class UmaViewerUI : MonoBehaviour
|
||||
case "0004_01_00":
|
||||
return "Towel";
|
||||
default:
|
||||
return defaultname;
|
||||
return (defaultname == "00")? "Default" : defaultname;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user