Stage and anim lengths display
This commit is contained in:
parent
ab5a2a4c02
commit
cc28ac4bd4
Binary file not shown.
|
@ -522,7 +522,7 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_Material: {fileID: 0}
|
m_Material: {fileID: 0}
|
||||||
m_Color: {r: 1, g: 0.85, b: 0, a: 1}
|
m_Color: {r: 0.75, g: 0.75, b: 0.75, a: 1}
|
||||||
m_RaycastTarget: 1
|
m_RaycastTarget: 1
|
||||||
m_Maskable: 1
|
m_Maskable: 1
|
||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
|
|
|
@ -6646,9 +6646,9 @@ RectTransform:
|
||||||
m_Father: {fileID: 539052777}
|
m_Father: {fileID: 539052777}
|
||||||
m_RootOrder: 7
|
m_RootOrder: 7
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 926.45465, y: -22.5}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 160, y: 25}
|
m_SizeDelta: {x: 160, y: 25}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &429161118
|
--- !u!114 &429161118
|
||||||
|
@ -7165,9 +7165,9 @@ RectTransform:
|
||||||
m_Father: {fileID: 539052777}
|
m_Father: {fileID: 539052777}
|
||||||
m_RootOrder: 5
|
m_RootOrder: 5
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 640.0244, y: -22.5}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 176.86053, y: 25}
|
m_SizeDelta: {x: 176.86053, y: 25}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &462332576
|
--- !u!114 &462332576
|
||||||
|
@ -8319,6 +8319,8 @@ MonoBehaviour:
|
||||||
stretchKeyframesToggle: {fileID: 462332576}
|
stretchKeyframesToggle: {fileID: 462332576}
|
||||||
playBackSpeedField: {fileID: 1579799916}
|
playBackSpeedField: {fileID: 1579799916}
|
||||||
playToggleButton: {fileID: 79733375}
|
playToggleButton: {fileID: 79733375}
|
||||||
|
stageLengthText: {fileID: 1137451986}
|
||||||
|
animationLengthText: {fileID: 1293297801}
|
||||||
actorBodyPrefab: {fileID: -4411442180840688308, guid: dc4c8b005322f3b46a2f122a55f38db2,
|
actorBodyPrefab: {fileID: -4411442180840688308, guid: dc4c8b005322f3b46a2f122a55f38db2,
|
||||||
type: 3}
|
type: 3}
|
||||||
animationTimelinePrefab: {fileID: 3541467645058788217, guid: eac2d5e7275f9064facfeb818ee30308,
|
animationTimelinePrefab: {fileID: 3541467645058788217, guid: eac2d5e7275f9064facfeb818ee30308,
|
||||||
|
@ -8642,7 +8644,6 @@ GameObject:
|
||||||
- component: {fileID: 539052777}
|
- component: {fileID: 539052777}
|
||||||
- component: {fileID: 539052779}
|
- component: {fileID: 539052779}
|
||||||
- component: {fileID: 539052781}
|
- component: {fileID: 539052781}
|
||||||
- component: {fileID: 539052780}
|
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: AnimControlPanel
|
m_Name: AnimControlPanel
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
@ -8669,13 +8670,14 @@ RectTransform:
|
||||||
- {fileID: 462332575}
|
- {fileID: 462332575}
|
||||||
- {fileID: 1083597498}
|
- {fileID: 1083597498}
|
||||||
- {fileID: 429161117}
|
- {fileID: 429161117}
|
||||||
|
- {fileID: 665717983}
|
||||||
m_Father: {fileID: 1100016168}
|
m_Father: {fileID: 1100016168}
|
||||||
m_RootOrder: 1
|
m_RootOrder: 1
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 10, y: -22.5}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 1055, y: 45}
|
m_SizeDelta: {x: 0, y: 45}
|
||||||
m_Pivot: {x: 0, y: 0.5}
|
m_Pivot: {x: 0, y: 0.5}
|
||||||
--- !u!222 &539052779
|
--- !u!222 &539052779
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
|
@ -8685,20 +8687,6 @@ CanvasRenderer:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 539052776}
|
m_GameObject: {fileID: 539052776}
|
||||||
m_CullTransparentMesh: 0
|
m_CullTransparentMesh: 0
|
||||||
--- !u!114 &539052780
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 539052776}
|
|
||||||
m_Enabled: 0
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_HorizontalFit: 1
|
|
||||||
m_VerticalFit: 1
|
|
||||||
--- !u!114 &539052781
|
--- !u!114 &539052781
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -9099,10 +9087,10 @@ RectTransform:
|
||||||
m_Father: {fileID: 539052777}
|
m_Father: {fileID: 539052777}
|
||||||
m_RootOrder: 3
|
m_RootOrder: 3
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 490.79706, y: -22.5}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 11.594109, y: 25}
|
m_SizeDelta: {x: 12, y: 25}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &567758163
|
--- !u!114 &567758163
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
|
@ -10735,6 +10723,128 @@ CanvasRenderer:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 658284331}
|
m_GameObject: {fileID: 658284331}
|
||||||
m_CullTransparentMesh: 0
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!1 &665717982
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 665717983}
|
||||||
|
- component: {fileID: 665717987}
|
||||||
|
- component: {fileID: 665717986}
|
||||||
|
- component: {fileID: 665717985}
|
||||||
|
- component: {fileID: 665717984}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: 'StageTimeMetricsLabel '
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &665717983
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 665717982}
|
||||||
|
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:
|
||||||
|
- {fileID: 1137451984}
|
||||||
|
- {fileID: 1834285083}
|
||||||
|
- {fileID: 1293297799}
|
||||||
|
m_Father: {fileID: 539052777}
|
||||||
|
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: 1006.86053, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0, y: 0}
|
||||||
|
--- !u!114 &665717984
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 665717982}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_HorizontalFit: 2
|
||||||
|
m_VerticalFit: 2
|
||||||
|
--- !u!114 &665717985
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 665717982}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Padding:
|
||||||
|
m_Left: 20
|
||||||
|
m_Right: 0
|
||||||
|
m_Top: 0
|
||||||
|
m_Bottom: 0
|
||||||
|
m_ChildAlignment: 0
|
||||||
|
m_Spacing: 0
|
||||||
|
m_ChildForceExpandWidth: 0
|
||||||
|
m_ChildForceExpandHeight: 0
|
||||||
|
m_ChildControlWidth: 0
|
||||||
|
m_ChildControlHeight: 0
|
||||||
|
m_ChildScaleWidth: 1
|
||||||
|
m_ChildScaleHeight: 1
|
||||||
|
--- !u!114 &665717986
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 665717982}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_FontData:
|
||||||
|
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_FontSize: 14
|
||||||
|
m_FontStyle: 0
|
||||||
|
m_BestFit: 0
|
||||||
|
m_MinSize: 10
|
||||||
|
m_MaxSize: 40
|
||||||
|
m_Alignment: 3
|
||||||
|
m_AlignByGeometry: 0
|
||||||
|
m_RichText: 1
|
||||||
|
m_HorizontalOverflow: 0
|
||||||
|
m_VerticalOverflow: 0
|
||||||
|
m_LineSpacing: 1
|
||||||
|
m_Text:
|
||||||
|
--- !u!222 &665717987
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 665717982}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
--- !u!1 &671921653
|
--- !u!1 &671921653
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -11311,10 +11421,10 @@ RectTransform:
|
||||||
m_Father: {fileID: 1100016168}
|
m_Father: {fileID: 1100016168}
|
||||||
m_RootOrder: 2
|
m_RootOrder: 2
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 537.5, y: -52.5}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 1055, y: 15}
|
m_SizeDelta: {x: 0, y: 15}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!1 &719308825
|
--- !u!1 &719308825
|
||||||
GameObject:
|
GameObject:
|
||||||
|
@ -12090,9 +12200,9 @@ RectTransform:
|
||||||
m_Father: {fileID: 539052777}
|
m_Father: {fileID: 539052777}
|
||||||
m_RootOrder: 2
|
m_RootOrder: 2
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 457.5, y: -22.5}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 55, y: 25}
|
m_SizeDelta: {x: 55, y: 25}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &760297267
|
--- !u!114 &760297267
|
||||||
|
@ -16228,9 +16338,9 @@ RectTransform:
|
||||||
m_Father: {fileID: 539052777}
|
m_Father: {fileID: 539052777}
|
||||||
m_RootOrder: 6
|
m_RootOrder: 6
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 787.45465, y: -22.5}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 118, y: 25}
|
m_SizeDelta: {x: 118, y: 25}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &1083597499
|
--- !u!114 &1083597499
|
||||||
|
@ -16423,7 +16533,7 @@ GameObject:
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!224 &1100016168
|
--- !u!224 &1100016168
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -16444,7 +16554,7 @@ RectTransform:
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 1, y: 0}
|
m_AnchorMax: {x: 1, y: 0}
|
||||||
m_AnchoredPosition: {x: 0, y: 40}
|
m_AnchoredPosition: {x: 0, y: 40}
|
||||||
m_SizeDelta: {x: 0, y: 65}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0, y: 0}
|
m_Pivot: {x: 0, y: 0}
|
||||||
--- !u!114 &1100016169
|
--- !u!114 &1100016169
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
|
@ -16952,6 +17062,99 @@ CanvasRenderer:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1136677496}
|
m_GameObject: {fileID: 1136677496}
|
||||||
m_CullTransparentMesh: 0
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!1 &1137451983
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1137451984}
|
||||||
|
- component: {fileID: 1137451987}
|
||||||
|
- component: {fileID: 1137451986}
|
||||||
|
- component: {fileID: 1137451985}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: StageLengthText
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1137451984
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1137451983}
|
||||||
|
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: 665717983}
|
||||||
|
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: 20, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 25}
|
||||||
|
m_Pivot: {x: 0, y: 0.5}
|
||||||
|
--- !u!114 &1137451985
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1137451983}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_HorizontalFit: 2
|
||||||
|
m_VerticalFit: 0
|
||||||
|
--- !u!114 &1137451986
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1137451983}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_FontData:
|
||||||
|
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_FontSize: 14
|
||||||
|
m_FontStyle: 0
|
||||||
|
m_BestFit: 0
|
||||||
|
m_MinSize: 10
|
||||||
|
m_MaxSize: 40
|
||||||
|
m_Alignment: 5
|
||||||
|
m_AlignByGeometry: 0
|
||||||
|
m_RichText: 1
|
||||||
|
m_HorizontalOverflow: 0
|
||||||
|
m_VerticalOverflow: 0
|
||||||
|
m_LineSpacing: 1
|
||||||
|
m_Text: 'Stage length: 600 (10 s)'
|
||||||
|
--- !u!222 &1137451987
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1137451983}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
--- !u!1 &1148771915
|
--- !u!1 &1148771915
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -19933,6 +20136,99 @@ CanvasRenderer:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1293104865}
|
m_GameObject: {fileID: 1293104865}
|
||||||
m_CullTransparentMesh: 0
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!1 &1293297798
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1293297799}
|
||||||
|
- component: {fileID: 1293297802}
|
||||||
|
- component: {fileID: 1293297801}
|
||||||
|
- component: {fileID: 1293297800}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: AnimationLengthText
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1293297799
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1293297798}
|
||||||
|
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: 665717983}
|
||||||
|
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: 185, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 25}
|
||||||
|
m_Pivot: {x: 0, y: 0.5}
|
||||||
|
--- !u!114 &1293297800
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1293297798}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_HorizontalFit: 2
|
||||||
|
m_VerticalFit: 0
|
||||||
|
--- !u!114 &1293297801
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1293297798}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_FontData:
|
||||||
|
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_FontSize: 14
|
||||||
|
m_FontStyle: 0
|
||||||
|
m_BestFit: 0
|
||||||
|
m_MinSize: 10
|
||||||
|
m_MaxSize: 40
|
||||||
|
m_Alignment: 3
|
||||||
|
m_AlignByGeometry: 0
|
||||||
|
m_RichText: 1
|
||||||
|
m_HorizontalOverflow: 0
|
||||||
|
m_VerticalOverflow: 0
|
||||||
|
m_LineSpacing: 1
|
||||||
|
m_Text: 'Animation length: 600 (10 s)'
|
||||||
|
--- !u!222 &1293297802
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1293297798}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
--- !u!1 &1297071851
|
--- !u!1 &1297071851
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -22179,7 +22475,7 @@ RectTransform:
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 20, y: 0}
|
m_SizeDelta: {x: 20, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
@ -24293,9 +24589,9 @@ RectTransform:
|
||||||
m_Father: {fileID: 539052777}
|
m_Father: {fileID: 539052777}
|
||||||
m_RootOrder: 1
|
m_RootOrder: 1
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 382.5, y: -22.5}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 95, y: 25}
|
m_SizeDelta: {x: 95, y: 25}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &1567556988
|
--- !u!114 &1567556988
|
||||||
|
@ -25561,9 +25857,9 @@ RectTransform:
|
||||||
m_Father: {fileID: 539052777}
|
m_Father: {fileID: 539052777}
|
||||||
m_RootOrder: 4
|
m_RootOrder: 4
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 524.0941, y: -22.5}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 55, y: 25}
|
m_SizeDelta: {x: 55, y: 25}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &1676585155
|
--- !u!114 &1676585155
|
||||||
|
@ -26939,9 +27235,9 @@ RectTransform:
|
||||||
m_Father: {fileID: 539052777}
|
m_Father: {fileID: 539052777}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 190, y: -22.5}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 290, y: 35}
|
m_SizeDelta: {x: 290, y: 35}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &1791478861
|
--- !u!114 &1791478861
|
||||||
|
@ -27740,6 +28036,84 @@ CanvasRenderer:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1833911027}
|
m_GameObject: {fileID: 1833911027}
|
||||||
m_CullTransparentMesh: 0
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!1 &1834285082
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1834285083}
|
||||||
|
- component: {fileID: 1834285085}
|
||||||
|
- component: {fileID: 1834285084}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: /
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1834285083
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1834285082}
|
||||||
|
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: 665717983}
|
||||||
|
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: 12, y: 25}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &1834285084
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1834285082}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_FontData:
|
||||||
|
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_FontSize: 14
|
||||||
|
m_FontStyle: 0
|
||||||
|
m_BestFit: 0
|
||||||
|
m_MinSize: 10
|
||||||
|
m_MaxSize: 40
|
||||||
|
m_Alignment: 4
|
||||||
|
m_AlignByGeometry: 0
|
||||||
|
m_RichText: 1
|
||||||
|
m_HorizontalOverflow: 0
|
||||||
|
m_VerticalOverflow: 0
|
||||||
|
m_LineSpacing: 1
|
||||||
|
m_Text: /
|
||||||
|
--- !u!222 &1834285085
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1834285082}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
--- !u!1 &1845441704
|
--- !u!1 &1845441704
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -16,7 +16,9 @@ namespace RimWorldAnimationStudio
|
||||||
[XmlArray("interactionDefTypes"), XmlArrayItem("li")] public List<string> interactionDefTypes = new List<string>();
|
[XmlArray("interactionDefTypes"), XmlArrayItem("li")] public List<string> interactionDefTypes = new List<string>();
|
||||||
[XmlArray("actors"), XmlArrayItem("li")] public List<Actor> actors = new List<Actor>();
|
[XmlArray("actors"), XmlArrayItem("li")] public List<Actor> actors = new List<Actor>();
|
||||||
[XmlArray("animationStages"), XmlArrayItem("li")] public List<AnimationStage> animationStages = new List<AnimationStage>();
|
[XmlArray("animationStages"), XmlArrayItem("li")] public List<AnimationStage> animationStages = new List<AnimationStage>();
|
||||||
[XmlIgnore] public int animationTimeTicks = 0;
|
|
||||||
|
[XmlIgnore] public int animationTimeTicks { get { return animationStages.Sum(x => x.playTimeTicks); } }
|
||||||
|
[XmlIgnore] public int animationTimeTicksQuick { get { return animationStages.Sum(x => x.playTimeTicksQuick); } }
|
||||||
|
|
||||||
public bool ShouldSerializesexTypes() { return sexTypes.NotNullOrEmpty(); }
|
public bool ShouldSerializesexTypes() { return sexTypes.NotNullOrEmpty(); }
|
||||||
public bool ShouldSerializeinteractionDefTypes() { return interactionDefTypes.NotNullOrEmpty(); }
|
public bool ShouldSerializeinteractionDefTypes() { return interactionDefTypes.NotNullOrEmpty(); }
|
||||||
|
@ -25,13 +27,8 @@ namespace RimWorldAnimationStudio
|
||||||
|
|
||||||
public void Initialize()
|
public void Initialize()
|
||||||
{
|
{
|
||||||
animationTimeTicks = 0;
|
|
||||||
|
|
||||||
foreach (AnimationStage stage in animationStages)
|
foreach (AnimationStage stage in animationStages)
|
||||||
{
|
{ stage.Initialize(); }
|
||||||
stage.Initialize();
|
|
||||||
animationTimeTicks += stage.playTimeTicks;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ValidateData()
|
public void ValidateData()
|
||||||
|
|
|
@ -11,7 +11,7 @@ namespace RimWorldAnimationStudio
|
||||||
public string stageName = "NewStage";
|
public string stageName = "NewStage";
|
||||||
public int stageIndex = 0;
|
public int stageIndex = 0;
|
||||||
public int playTimeTicks = 0;
|
public int playTimeTicks = 0;
|
||||||
public int playTimeTicksQuick = -1;
|
public int playTimeTicksQuick = 0;
|
||||||
public bool isLooping = false;
|
public bool isLooping = false;
|
||||||
|
|
||||||
[XmlArray("animationClips"), XmlArrayItem("li")] public List<PawnAnimationClip> animationClips = new List<PawnAnimationClip>();
|
[XmlArray("animationClips"), XmlArrayItem("li")] public List<PawnAnimationClip> animationClips = new List<PawnAnimationClip>();
|
||||||
|
@ -50,7 +50,7 @@ namespace RimWorldAnimationStudio
|
||||||
}
|
}
|
||||||
|
|
||||||
Initialize();
|
Initialize();
|
||||||
|
playTimeTicksQuick = playTimeTicks;
|
||||||
Workspace.animationDef.animationStages.Add(this);
|
Workspace.animationDef.animationStages.Add(this);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -21,14 +21,10 @@ namespace RimWorldAnimationStudio
|
||||||
anchorTransform = transform.parent;
|
anchorTransform = transform.parent;
|
||||||
this.actorID = actorID;
|
this.actorID = actorID;
|
||||||
|
|
||||||
Reset();
|
|
||||||
|
|
||||||
PawnAnimationClip clip = Workspace.Instance.GetPawnAnimationClip(actorID);
|
PawnAnimationClip clip = Workspace.Instance.GetPawnAnimationClip(actorID);
|
||||||
|
|
||||||
if (clip == null || clip.keyframes.NullOrEmpty())
|
if (clip == null || clip.keyframes.NullOrEmpty())
|
||||||
{
|
{
|
||||||
//Debug.Log("Clip was empty");
|
|
||||||
|
|
||||||
clip = new PawnAnimationClip();
|
clip = new PawnAnimationClip();
|
||||||
clip.keyframes.Add(new PawnKeyframe());
|
clip.keyframes.Add(new PawnKeyframe());
|
||||||
clip.BuildSimpleCurves();
|
clip.BuildSimpleCurves();
|
||||||
|
@ -39,12 +35,27 @@ namespace RimWorldAnimationStudio
|
||||||
KeyframeSlider keyframeSlider = Instantiate(keyframeSliderPrefab, transform);
|
KeyframeSlider keyframeSlider = Instantiate(keyframeSliderPrefab, transform);
|
||||||
keyframeSlider.Initialize(this, actorID, keyframe.keyframeID);
|
keyframeSlider.Initialize(this, actorID, keyframe.keyframeID);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void Reset()
|
int keyframeCount = clip.keyframes.Count;
|
||||||
{
|
int childCount = GetComponentsInChildren<KeyframeSlider>().Count();
|
||||||
foreach(KeyframeSlider keyframeSlider in GetComponentsInChildren<KeyframeSlider>())
|
|
||||||
{ Destroy(keyframeSlider.gameObject); }
|
for (int i = 0; i < Mathf.Max(keyframeCount, childCount); i++)
|
||||||
|
{
|
||||||
|
// Add new keyframe sliders as required
|
||||||
|
if (i >= childCount)
|
||||||
|
{ Instantiate(keyframeSliderPrefab, transform); }
|
||||||
|
|
||||||
|
// Get objects to update
|
||||||
|
KeyframeSlider keyframeSlider = GetComponentsInChildren<KeyframeSlider>()[i];
|
||||||
|
|
||||||
|
// Update values
|
||||||
|
if (i < keyframeCount)
|
||||||
|
{ keyframeSlider.Initialize(this, actorID, clip.keyframes[i].keyframeID); }
|
||||||
|
|
||||||
|
// Remove excess objects as required
|
||||||
|
else
|
||||||
|
{ Destroy(keyframeSlider.gameObject); }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddPawnKeyFrame(int keyframeID)
|
public void AddPawnKeyFrame(int keyframeID)
|
||||||
|
@ -70,6 +81,8 @@ namespace RimWorldAnimationStudio
|
||||||
|
|
||||||
public void InitiateUpdateOfGhostFrames()
|
public void InitiateUpdateOfGhostFrames()
|
||||||
{
|
{
|
||||||
|
if (AnimationController.Instance.IsTimelineDirty()) return;
|
||||||
|
|
||||||
BroadcastMessage("UpdateGhostFrames");
|
BroadcastMessage("UpdateGhostFrames");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,12 +92,7 @@ namespace RimWorldAnimationStudio
|
||||||
int? siblingCount = anchorTransform.parent.GetComponentsInChildren<AnimationTimeline>()?.ToList()?.Count();
|
int? siblingCount = anchorTransform.parent.GetComponentsInChildren<AnimationTimeline>()?.ToList()?.Count();
|
||||||
|
|
||||||
if (siblingIndex != null && siblingCount != null && MoveAnimationTimeline(siblingIndex.Value, delta))
|
if (siblingIndex != null && siblingCount != null && MoveAnimationTimeline(siblingIndex.Value, delta))
|
||||||
{
|
{ AnimationController.Instance.InitializeAnimationTimeline(); }
|
||||||
//siblingIndex = Mathf.Clamp(siblingCount.Value + delta, 0, siblingCount.Value - 1);
|
|
||||||
//transform.SetSiblingIndex(transform.GetSiblingIndex() + delta);
|
|
||||||
AnimationController.Instance.ResetAnimationTimeline();
|
|
||||||
AnimationController.Instance.InitializeAnimationTimeline();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool MoveAnimationTimeline(int startIndex, int delta)
|
public bool MoveAnimationTimeline(int startIndex, int delta)
|
||||||
|
|
|
@ -187,11 +187,7 @@ namespace RimWorldAnimationStudio
|
||||||
{ linkedSlider = null; }
|
{ linkedSlider = null; }
|
||||||
|
|
||||||
else if (AnimationController.Instance.stretchKeyframesToggle.isOn && linkedSlider != null && linkedSlider.IsPivotKeyframe(keyframe) == false)
|
else if (AnimationController.Instance.stretchKeyframesToggle.isOn && linkedSlider != null && linkedSlider.IsPivotKeyframe(keyframe) == false)
|
||||||
{
|
{ value = Mathf.CeilToInt(linkedSlider.keyframe.atTick.Value + linkedOffset * linkedSlider.ScaledOffsetFromPivot()); }
|
||||||
//int minTick = linkedSlider.pivotKeyframe.atTick.Value + GetIndexAmongstSelectedKeyframes();
|
|
||||||
//value = Mathf.Clamp(Mathf.CeilToInt(linkedSlider.keyframe.atTick.Value + linkedOffset * linkedSlider.ScaledOffsetFromPivot()), minTick, Workspace.StageWindowSize);
|
|
||||||
value = Mathf.CeilToInt(linkedSlider.keyframe.atTick.Value + linkedOffset * linkedSlider.ScaledOffsetFromPivot());
|
|
||||||
}
|
|
||||||
|
|
||||||
else if (AnimationController.Instance.stretchKeyframesToggle.isOn == false && linkedSlider != null)
|
else if (AnimationController.Instance.stretchKeyframesToggle.isOn == false && linkedSlider != null)
|
||||||
{ value = Mathf.Clamp(linkedSlider.keyframe.atTick.Value + linkedOffset, Constants.minTick + 1, Workspace.StageWindowSize); }
|
{ value = Mathf.Clamp(linkedSlider.keyframe.atTick.Value + linkedOffset, Constants.minTick + 1, Workspace.StageWindowSize); }
|
||||||
|
@ -219,7 +215,6 @@ namespace RimWorldAnimationStudio
|
||||||
|
|
||||||
public float ScaledOffsetFromPivot()
|
public float ScaledOffsetFromPivot()
|
||||||
{
|
{
|
||||||
//if (IsPivotKeyframe(keyframe)) return 1f;
|
|
||||||
if (dragTickStart == pivotKeyframe.atTick.Value) return 0f;
|
if (dragTickStart == pivotKeyframe.atTick.Value) return 0f;
|
||||||
|
|
||||||
return (float)(keyframe.atTick.Value - pivotKeyframe.atTick.Value) / (dragTickStart - pivotKeyframe.atTick.Value);
|
return (float)(keyframe.atTick.Value - pivotKeyframe.atTick.Value) / (dragTickStart - pivotKeyframe.atTick.Value);
|
||||||
|
@ -229,13 +224,5 @@ namespace RimWorldAnimationStudio
|
||||||
{
|
{
|
||||||
return pivotKeyframe == otherKeyframe;
|
return pivotKeyframe == otherKeyframe;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int GetIndexAmongstSelectedKeyframes()
|
|
||||||
{
|
|
||||||
List<PawnKeyframe> selectedKeyframes = Workspace.Instance.GetPawnKeyframes(Workspace.keyframeID).OrderBy(x => x.atTick)?.ToList();
|
|
||||||
if (selectedKeyframes.NullOrEmpty() || selectedKeyframes.Contains(keyframe) == false) return -1;
|
|
||||||
|
|
||||||
return selectedKeyframes.IndexOf(keyframe);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,8 @@ namespace RimWorldAnimationStudio
|
||||||
public Toggle stretchKeyframesToggle;
|
public Toggle stretchKeyframesToggle;
|
||||||
public InputField playBackSpeedField;
|
public InputField playBackSpeedField;
|
||||||
public Button playToggleButton;
|
public Button playToggleButton;
|
||||||
|
public Text stageLengthText;
|
||||||
|
public Text animationLengthText;
|
||||||
|
|
||||||
[Header("Prefabs")]
|
[Header("Prefabs")]
|
||||||
public ActorBody actorBodyPrefab;
|
public ActorBody actorBodyPrefab;
|
||||||
|
@ -47,6 +49,12 @@ namespace RimWorldAnimationStudio
|
||||||
public void MakeTimelineDirty()
|
public void MakeTimelineDirty()
|
||||||
{ isTimelineDirty = true; }
|
{ isTimelineDirty = true; }
|
||||||
|
|
||||||
|
public bool IsDirty()
|
||||||
|
{ return isDirty; }
|
||||||
|
|
||||||
|
public bool IsTimelineDirty()
|
||||||
|
{ return isTimelineDirty; }
|
||||||
|
|
||||||
public void Update()
|
public void Update()
|
||||||
{
|
{
|
||||||
// No animation, exit
|
// No animation, exit
|
||||||
|
@ -56,6 +64,25 @@ namespace RimWorldAnimationStudio
|
||||||
if (Workspace.animationDef != null && isDirty)
|
if (Workspace.animationDef != null && isDirty)
|
||||||
{ Initialize(); }
|
{ Initialize(); }
|
||||||
|
|
||||||
|
// Update animation lengths
|
||||||
|
if (stageLoopDropdown.value == 3)
|
||||||
|
{
|
||||||
|
stageLengthText.text = "Stage length (quickie): " + Workspace.animationDef.animationStages[Workspace.stageID].playTimeTicksQuick + " (" + Workspace.animationDef.animationStages[Workspace.stageID].playTimeTicksQuick / 60f + " s)";
|
||||||
|
animationLengthText.text = "Animation length (quickie): " + Workspace.animationDef.animationTimeTicksQuick + " (" + Workspace.animationDef.animationTimeTicksQuick / 60f + " s)";
|
||||||
|
|
||||||
|
LayoutRebuilder.ForceRebuildLayoutImmediate(stageLengthText.GetComponent<RectTransform>());
|
||||||
|
LayoutRebuilder.ForceRebuildLayoutImmediate(animationLengthText.GetComponent<RectTransform>());
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
stageLengthText.text = "Stage length (normal): " + Workspace.animationDef.animationStages[Workspace.stageID].playTimeTicks + " (" + Workspace.animationDef.animationStages[Workspace.stageID].playTimeTicks / 60f + " s)";
|
||||||
|
animationLengthText.text = "Animation length (normal): " + Workspace.animationDef.animationTimeTicks + " (" + Workspace.animationDef.animationTimeTicks / 60f + " s)";
|
||||||
|
|
||||||
|
LayoutRebuilder.ForceRebuildLayoutImmediate(stageLengthText.GetComponent<RectTransform>());
|
||||||
|
LayoutRebuilder.ForceRebuildLayoutImmediate(animationLengthText.GetComponent<RectTransform>());
|
||||||
|
}
|
||||||
|
|
||||||
// Update tick if animating
|
// Update tick if animating
|
||||||
stageTick = Mathf.Clamp(stageTick, Constants.minTick, Workspace.StageWindowSize);
|
stageTick = Mathf.Clamp(stageTick, Constants.minTick, Workspace.StageWindowSize);
|
||||||
|
|
||||||
|
@ -123,10 +150,7 @@ namespace RimWorldAnimationStudio
|
||||||
public void UpdateAnimation()
|
public void UpdateAnimation()
|
||||||
{
|
{
|
||||||
if (AnimationTimelinesNeedUpdate())
|
if (AnimationTimelinesNeedUpdate())
|
||||||
{
|
{ InitializeAnimationTimeline(); }
|
||||||
ResetAnimationTimeline();
|
|
||||||
InitializeAnimationTimeline();
|
|
||||||
}
|
|
||||||
|
|
||||||
List<ActorBody> _actorBodies = actorBodies.GetComponentsInChildren<ActorBody>().ToList();
|
List<ActorBody> _actorBodies = actorBodies.GetComponentsInChildren<ActorBody>().ToList();
|
||||||
|
|
||||||
|
@ -217,59 +241,73 @@ namespace RimWorldAnimationStudio
|
||||||
|
|
||||||
public void Initialize()
|
public void Initialize()
|
||||||
{
|
{
|
||||||
|
isDirty = true;
|
||||||
Debug.Log("Initializing animation preview");
|
Debug.Log("Initializing animation preview");
|
||||||
|
|
||||||
foreach (Transform child in transform)
|
foreach (Transform child in transform)
|
||||||
{ child.gameObject.SetActive(true); }
|
{ child.gameObject.SetActive(true); }
|
||||||
|
|
||||||
Reset();
|
|
||||||
|
|
||||||
InitializeAnimationTimeline();
|
InitializeAnimationTimeline();
|
||||||
StageCardManager.Instance.Initialize();
|
StageCardManager.Instance.Initialize();
|
||||||
|
|
||||||
isDirty = false;
|
isDirty = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Reset()
|
||||||
|
{
|
||||||
|
Workspace.stageID = 0;
|
||||||
|
isAnimating = false;
|
||||||
|
timeSinceLastUpdate = 0;
|
||||||
|
cycleIndex = 0;
|
||||||
|
}
|
||||||
|
|
||||||
public void InitializeAnimationTimeline()
|
public void InitializeAnimationTimeline()
|
||||||
{
|
{
|
||||||
|
isTimelineDirty = true;
|
||||||
|
|
||||||
cyclesNormalField.text = Mathf.Max(Mathf.CeilToInt((float)Workspace.animationDef.animationStages[Workspace.stageID].playTimeTicks / Workspace.StageWindowSize), 1).ToString();
|
cyclesNormalField.text = Mathf.Max(Mathf.CeilToInt((float)Workspace.animationDef.animationStages[Workspace.stageID].playTimeTicks / Workspace.StageWindowSize), 1).ToString();
|
||||||
cyclesFastField.text = Mathf.Max(Mathf.CeilToInt((float)Workspace.animationDef.animationStages[Workspace.stageID].playTimeTicksQuick / Workspace.StageWindowSize), 0).ToString();
|
cyclesFastField.text = Mathf.Max(Mathf.CeilToInt((float)Workspace.animationDef.animationStages[Workspace.stageID].playTimeTicksQuick / Workspace.StageWindowSize), 0).ToString();
|
||||||
|
|
||||||
Workspace.animationDef.animationStages[Workspace.stageID].isLooping = int.Parse(cyclesNormalField.text) > 1 ? true : false;
|
Workspace.animationDef.animationStages[Workspace.stageID].isLooping = int.Parse(cyclesNormalField.text) > 1 ? true : false;
|
||||||
|
|
||||||
for (int actorID = 0; actorID < Workspace.animationDef.actors.Count; actorID++)
|
int actorCount = Workspace.animationDef.actors.Count;
|
||||||
{
|
int childCount = animationTimelines.GetComponentsInChildren<AnimationTimeline>().Count();
|
||||||
ActorBody actorBody = Instantiate(actorBodyPrefab, actorBodies.transform);
|
|
||||||
actorBody.Initialize(actorID);
|
|
||||||
|
|
||||||
AnimationTimeline animationTimeline = Instantiate(animationTimelinePrefab, animationTimelines).GetComponentInChildren<AnimationTimeline>();
|
for (int actorID = 0; actorID < Mathf.Max(actorCount, childCount); actorID++)
|
||||||
animationTimeline.Initialize(actorID);
|
{
|
||||||
|
// Add new actors as required
|
||||||
|
if (actorID >= childCount)
|
||||||
|
{
|
||||||
|
Instantiate(animationTimelinePrefab, animationTimelines);
|
||||||
|
Instantiate(actorBodyPrefab, actorBodies.transform);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get objects to update
|
||||||
|
AnimationTimeline animationTimeline = animationTimelines.GetComponentsInChildren<AnimationTimeline>()[actorID];
|
||||||
|
ActorBody actorBody = actorBodies.GetComponentsInChildren<ActorBody>()[actorID];
|
||||||
|
|
||||||
|
// Update values
|
||||||
|
if (actorID < actorCount)
|
||||||
|
{
|
||||||
|
animationTimeline.Initialize(actorID);
|
||||||
|
actorBody.Initialize(actorID);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove excess objects as required
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Destroy(animationTimeline.transform.parent.gameObject);
|
||||||
|
Destroy(actorBody.gameObject);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
animationClipLengthField.text = Workspace.StageWindowSize.ToString();
|
animationClipLengthField.text = Workspace.StageWindowSize.ToString();
|
||||||
stageTimelineSlider.maxValue = Workspace.StageWindowSize;
|
stageTimelineSlider.maxValue = Workspace.StageWindowSize;
|
||||||
|
|
||||||
isTimelineDirty = false;
|
isTimelineDirty = false;
|
||||||
}
|
|
||||||
|
|
||||||
public void Reset()
|
foreach (AnimationTimeline timeline in animationTimelines.GetComponentsInChildren<AnimationTimeline>())
|
||||||
{
|
{ timeline.InitiateUpdateOfGhostFrames(); }
|
||||||
Workspace.stageID = 0;
|
|
||||||
isAnimating = false;
|
|
||||||
ResetAnimationTimeline();
|
|
||||||
StageCardManager.Instance.Reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ResetAnimationTimeline()
|
|
||||||
{
|
|
||||||
timeSinceLastUpdate = 0;
|
|
||||||
cycleIndex = 0;
|
|
||||||
|
|
||||||
foreach (ActorBody actorBody in actorBodies.GetComponentsInChildren<ActorBody>())
|
|
||||||
{ Destroy(actorBody.gameObject); }
|
|
||||||
|
|
||||||
foreach (AnimationTimeline animationTimeline in animationTimelines.GetComponentsInChildren<AnimationTimeline>())
|
|
||||||
{ Destroy(animationTimeline.transform.parent.gameObject); }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddActor()
|
public void AddActor()
|
||||||
|
@ -436,41 +474,6 @@ namespace RimWorldAnimationStudio
|
||||||
Workspace.Instance.RecordEvent("Keyframe pasted");
|
Workspace.Instance.RecordEvent("Keyframe pasted");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*public void PastePawnKeyframes()
|
|
||||||
{
|
|
||||||
foreach (PawnKeyframe keyframe in Workspace.copiedKeyframes)
|
|
||||||
{
|
|
||||||
PawnAnimationClip clip = Workspace.animationDef.animationStages[Workspace.stageID].animationClips[keyframe.actorID];
|
|
||||||
|
|
||||||
if (Workspace.Instance.DoesPawnKeyframeExistAtTick(Workspace.stageID, keyframe.actorID, stageTick))
|
|
||||||
{
|
|
||||||
PawnKeyframe oldKeyframe = Workspace.animationDef.animationStages[Workspace.stageID].animationClips[keyframe.actorID].keyframes.First(x => x.atTick == stageTick);
|
|
||||||
|
|
||||||
RemovePawnKeyframe(keyframe.actorID, oldKeyframe.keyframeID, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
keyframe.GenerateKeyframeID(keyframe.actorID);
|
|
||||||
keyframe.atTick = stageTick;
|
|
||||||
|
|
||||||
PawnKeyframe nextKeyframe = clip.keyframes.FirstOrDefault(x => x.atTick > stageTick);
|
|
||||||
|
|
||||||
if (nextKeyframe != null)
|
|
||||||
{ clip.keyframes.Insert(clip.keyframes.IndexOf(nextKeyframe), keyframe); }
|
|
||||||
|
|
||||||
else
|
|
||||||
{ clip.keyframes.Add(keyframe); }
|
|
||||||
|
|
||||||
clip.BuildSimpleCurves();
|
|
||||||
|
|
||||||
animationTimelines.GetComponentsInChildren<AnimationTimeline>()[keyframe.actorID].AddPawnKeyFrame(keyframe.keyframeID);
|
|
||||||
|
|
||||||
clip.BuildSimpleCurves();
|
|
||||||
}
|
|
||||||
|
|
||||||
Workspace.Instance.RecordEvent("Keyframe pasted");
|
|
||||||
}*/
|
|
||||||
|
|
||||||
public void RemovePawnKeyframe()
|
public void RemovePawnKeyframe()
|
||||||
{
|
{
|
||||||
foreach (int keyframeID in Workspace.keyframeID)
|
foreach (int keyframeID in Workspace.keyframeID)
|
||||||
|
@ -541,10 +544,7 @@ namespace RimWorldAnimationStudio
|
||||||
Debug.Log("Resizing animation clip length to " + newStageWindowSize.ToString() + " ticks.");
|
Debug.Log("Resizing animation clip length to " + newStageWindowSize.ToString() + " ticks.");
|
||||||
|
|
||||||
if (stretchKeyframesToggle.isOn)
|
if (stretchKeyframesToggle.isOn)
|
||||||
{
|
{ StretchKeyframes(newStageWindowSize); }
|
||||||
List<PawnKeyframe> keyframes = Workspace.animationDef.animationStages[Workspace.stageID].animationClips.SelectMany(x => x.keyframes)?.ToList();
|
|
||||||
StretchKeyframes(keyframes, Workspace.StageWindowSize, newStageWindowSize);
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -569,7 +569,7 @@ namespace RimWorldAnimationStudio
|
||||||
ResizeStageWindowSize(newStageWindowSize);
|
ResizeStageWindowSize(newStageWindowSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*public void StretchKeyframes(int newStageWindowSize)
|
public void StretchKeyframes(int newStageWindowSize)
|
||||||
{
|
{
|
||||||
float scale = (float)newStageWindowSize / Workspace.StageWindowSize;
|
float scale = (float)newStageWindowSize / Workspace.StageWindowSize;
|
||||||
|
|
||||||
|
@ -583,39 +583,6 @@ namespace RimWorldAnimationStudio
|
||||||
|
|
||||||
clip.BuildSimpleCurves();
|
clip.BuildSimpleCurves();
|
||||||
}
|
}
|
||||||
}*/
|
|
||||||
|
|
||||||
public void StretchKeyframes(List<PawnKeyframe> keyframesToStretch, int v1, int v2)
|
|
||||||
{
|
|
||||||
int v0 = keyframesToStretch.Min(x => x.atTick.Value);
|
|
||||||
|
|
||||||
if (v1 == v0)
|
|
||||||
{ OffsetKeyframes(keyframesToStretch, v1, v2); return; }
|
|
||||||
|
|
||||||
float scaleFactor = (float)(v2 - v0) / (v1 - v0);
|
|
||||||
|
|
||||||
foreach (PawnKeyframe keyframe in keyframesToStretch)
|
|
||||||
{
|
|
||||||
keyframe.atTick = Mathf.RoundToInt(scaleFactor * (keyframe.atTick.Value - v0) + v0);
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach(PawnAnimationClip clip in Workspace.animationDef.animationStages[Workspace.stageID].animationClips)
|
|
||||||
{ clip.BuildSimpleCurves(); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OffsetKeyframes(List<PawnKeyframe> keyframesToOffset, int v1, int v2)
|
|
||||||
{
|
|
||||||
float offset = v2 - v1;
|
|
||||||
|
|
||||||
foreach (PawnKeyframe keyframe in keyframesToOffset)
|
|
||||||
{
|
|
||||||
keyframe.atTick = Mathf.RoundToInt(keyframe.atTick.Value + offset);
|
|
||||||
Debug.Log(keyframe.atTick);
|
|
||||||
Workspace.Instance.GetAnimationClipThatOwnsKeyframe(keyframe.keyframeID, out int clipID).BuildSimpleCurves();
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (PawnAnimationClip clip in Workspace.animationDef.animationStages[Workspace.stageID].animationClips)
|
|
||||||
{ clip.BuildSimpleCurves(); }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ResizeStageWindowSize(int newStageWindowSize)
|
public void ResizeStageWindowSize(int newStageWindowSize)
|
||||||
|
|
|
@ -78,7 +78,20 @@ namespace RimWorldAnimationStudio
|
||||||
|
|
||||||
public void RunPostLoadOperations(AnimationDef animationDef)
|
public void RunPostLoadOperations(AnimationDef animationDef)
|
||||||
{
|
{
|
||||||
|
if (animationDef.animationTimeTicksQuick <= 0)
|
||||||
|
{
|
||||||
|
if (animationDef.animationStages.Count > 1)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < animationDef.animationStages.Count; i++)
|
||||||
|
{
|
||||||
|
if (i == 0) continue;
|
||||||
|
animationDef.animationStages[i].playTimeTicksQuick = animationDef.animationStages[i].playTimeTicks;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (animationDef.animationStages.Count == 0)
|
||||||
|
{ animationDef.animationStages[0].playTimeTicksQuick = animationDef.animationStages[0].playTimeTicks; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TryToSaveAnimation()
|
public void TryToSaveAnimation()
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
@ -14,6 +15,27 @@ namespace RimWorldAnimationStudio
|
||||||
{
|
{
|
||||||
foreach(AnimationStage stage in Workspace.animationDef.animationStages)
|
foreach(AnimationStage stage in Workspace.animationDef.animationStages)
|
||||||
{ MakeStageCard(stage.stageName); }
|
{ MakeStageCard(stage.stageName); }
|
||||||
|
|
||||||
|
int stageCount = Workspace.animationDef.animationStages.Count;
|
||||||
|
int childCount = GetComponentsInChildren<StageCard>().Count();
|
||||||
|
|
||||||
|
for (int i = 0; i < Mathf.Max(stageCount, childCount); i++)
|
||||||
|
{
|
||||||
|
// Add new stage cards as required
|
||||||
|
if (i >= childCount)
|
||||||
|
{ Instantiate(stageCardPrefab, transform); }
|
||||||
|
|
||||||
|
// Get objects to update
|
||||||
|
StageCard stageCard = GetComponentsInChildren<StageCard>()[i];
|
||||||
|
|
||||||
|
// Update values
|
||||||
|
if (i < stageCount)
|
||||||
|
{ stageCard.Initialize(Workspace.animationDef.animationStages[i].stageName); }
|
||||||
|
|
||||||
|
// Remove excess objects as required
|
||||||
|
else
|
||||||
|
{ Destroy(stageCard.gameObject); }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Reset()
|
public void Reset()
|
||||||
|
@ -41,7 +63,6 @@ namespace RimWorldAnimationStudio
|
||||||
public bool AddAnimationStage()
|
public bool AddAnimationStage()
|
||||||
{
|
{
|
||||||
AnimationStage stage = new AnimationStage();
|
AnimationStage stage = new AnimationStage();
|
||||||
|
|
||||||
Workspace.Instance.RecordEvent("Stage addition");
|
Workspace.Instance.RecordEvent("Stage addition");
|
||||||
|
|
||||||
return stage.MakeNew();
|
return stage.MakeNew();
|
||||||
|
|
|
@ -37,9 +37,6 @@ namespace RimWorldAnimationStudio
|
||||||
if (animationDef.animationStages[stageID].stageWindowSize < 0)
|
if (animationDef.animationStages[stageID].stageWindowSize < 0)
|
||||||
{ animationDef.animationStages[stageID].stageWindowSize = animationDef.animationStages[stageID].animationClips.Select(x => x.duration).Max(); }
|
{ animationDef.animationStages[stageID].stageWindowSize = animationDef.animationStages[stageID].animationClips.Select(x => x.duration).Max(); }
|
||||||
|
|
||||||
Debug.Log(animationDef.animationStages[stageID].stageWindowSize);
|
|
||||||
|
|
||||||
|
|
||||||
return animationDef.animationStages[stageID].stageWindowSize;
|
return animationDef.animationStages[stageID].stageWindowSize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -230,7 +227,6 @@ namespace RimWorldAnimationStudio
|
||||||
stageID = record.stageID;
|
stageID = record.stageID;
|
||||||
|
|
||||||
AnimationController.Instance.MakeTimelineDirty();
|
AnimationController.Instance.MakeTimelineDirty();
|
||||||
StageCardManager.Instance.Reset();
|
|
||||||
StageCardManager.Instance.Initialize();
|
StageCardManager.Instance.Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue