Skip to content

Commit

Permalink
Fix game freezeing on exit because of the resource monitor.
Browse files Browse the repository at this point in the history
  • Loading branch information
brett-taylor committed Jan 6, 2019
1 parent b97dd1b commit 06109d6
Show file tree
Hide file tree
Showing 22 changed files with 331 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!1 &1222060525602326
GameObject:
m_ObjectHideFlags: 1
Expand All @@ -109,6 +109,23 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1239436086438182
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 224970631480507326}
- component: {fileID: 222587529037669028}
- component: {fileID: 114063230837624922}
m_Layer: 5
m_Name: ResourceItem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1250426958453582
GameObject:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -296,6 +313,24 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1559173633256724
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 224377207137660236}
- component: {fileID: 222394537296725070}
- component: {fileID: 114667424799726632}
- component: {fileID: 114274482910367768}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1601841405038116
GameObject:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -432,6 +467,21 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!1 &1845682775371876
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 224001418904138316}
m_Layer: 5
m_Name: ItemHolder
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4141952873274758
Transform:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -557,6 +607,32 @@ MonoBehaviour:
m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5}
m_EffectDistance: {x: 1, y: -1}
m_UseGraphicAlpha: 1
--- !u!114 &114063230837624922
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1239436086438182}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.078431375, g: 0.38431373, b: 0.7058824, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Texture: {fileID: 0}
m_UVRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
--- !u!114 &114064180590734180
MonoBehaviour:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -617,6 +693,20 @@ MonoBehaviour:
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Resource Monitor
--- !u!114 &114274482910367768
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1559173633256724}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -900027084, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5}
m_EffectDistance: {x: 1, y: -1}
m_UseGraphicAlpha: 1
--- !u!114 &114316134507338702
MonoBehaviour:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -957,6 +1047,41 @@ MonoBehaviour:
m_InputActionsPerSecond: 10
m_RepeatDelay: 0.5
m_ForceModuleActive: 0
--- !u!114 &114667424799726632
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1559173633256724}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 50
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 50
m_Alignment: 2
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 'x1
'
--- !u!114 &114668610685184210
MonoBehaviour:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -1175,6 +1300,12 @@ CanvasRenderer:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1291996354329310}
--- !u!222 &222394537296725070
CanvasRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1559173633256724}
--- !u!222 &222400816468239888
CanvasRenderer:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -1211,6 +1342,12 @@ CanvasRenderer:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1250426958453582}
--- !u!222 &222587529037669028
CanvasRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1239436086438182}
--- !u!222 &222648394628873036
CanvasRenderer:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -1267,6 +1404,24 @@ Canvas:
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!224 &224001418904138316
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1845682775371876}
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: 224970631480507326}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 200, y: 200}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224022936339778858
RectTransform:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -1443,6 +1598,24 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224377207137660236
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1559173633256724}
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: 224970631480507326}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -5, y: 0}
m_SizeDelta: {x: -10, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224415236305965902
RectTransform:
m_ObjectHideFlags: 1
Expand All @@ -1456,6 +1629,7 @@ RectTransform:
- {fileID: 224637249828784064}
- {fileID: 224604548513425884}
- {fileID: 224634219861103846}
- {fileID: 224970631480507326}
m_Father: {fileID: 224283537111287526}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
Expand Down Expand Up @@ -1685,3 +1859,23 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 7}
m_SizeDelta: {x: 600, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224970631480507326
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1239436086438182}
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: 224001418904138316}
- {fileID: 224377207137660236}
m_Father: {fileID: 224415236305965902}
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_Pivot: {x: 0.5, y: 0.5}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ManifestFileVersion: 0
CRC: 2170159394
CRC: 1820679736
AssetBundleManifest:
AssetBundleInfos:
Info_0:
Expand Down
Binary file modified ResourceMonitor Unity Project/Built Asset Bundles/resources
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ManifestFileVersion: 0
CRC: 3116201863
CRC: 344358545
Hashes:
AssetFileHash:
serializedVersion: 2
Hash: b3f9ac2f149687dfd441e044b658aeed
Hash: a503e185ba493d89abd5df205d4c1378
TypeTreeHash:
serializedVersion: 2
Hash: cd706fa7e487f229c6b1a506387ac5ed
Expand Down
20 changes: 10 additions & 10 deletions ResourceMonitor Unity Project/Library/CurrentLayout.dwlt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ MonoBehaviour:
m_MinSize: {x: 683, y: 492}
m_MaxSize: {x: 14004, y: 14042}
vertical: 0
controlID: 49
controlID: 114
--- !u!114 &3
MonoBehaviour:
m_ObjectHideFlags: 52
Expand Down Expand Up @@ -489,8 +489,8 @@ MonoBehaviour:
m_DepthBufferBits: 0
m_Pos:
serializedVersion: 2
x: 1596
y: 92
x: -30404
y: -31951
width: 324
height: 926
m_ScrollPosition: {x: 0, y: 0}
Expand Down Expand Up @@ -528,9 +528,9 @@ MonoBehaviour:
height: 634
m_TreeViewState:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 48fbffff5afbffff80fbffffa0fbffffa4fbffffa6fbffff00000000
m_SelectedIDs: 5afbffff
m_LastClickedID: -1190
m_ExpandedIDs: 12fbffff48fbffff80fbffffa0fbffffa4fbffffa6fbffff00000000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
Expand Down Expand Up @@ -585,9 +585,9 @@ MonoBehaviour:
m_isRotationLocked: 0
m_AudioPlay: 0
m_Position:
m_Target: {x: -0.036659535, y: 0.04360065, z: 0.29956484}
m_Target: {x: -0.066140294, y: -0.092588514, z: -0.25554836}
speed: 2
m_Value: {x: -0.036659535, y: 0.04360065, z: 0.29956484}
m_Value: {x: -0.066140294, y: -0.092588514, z: -0.25554836}
m_RenderMode: 0
m_ValidateTrueMetals: 0
m_SceneViewState:
Expand All @@ -610,9 +610,9 @@ MonoBehaviour:
speed: 2
m_Value: 0
m_Rotation:
m_Target: {x: 0.00056211103, y: 0.9952013, z: -0.09768218, w: 0.0056855464}
m_Target: {x: -0.00031703955, y: 0.99521214, z: -0.097683266, w: -0.0032713753}
speed: 2
m_Value: {x: 0.00056211103, y: 0.9952013, z: -0.09768218, w: 0.0056855464}
m_Value: {x: -0.00031703955, y: 0.99521214, z: -0.097683266, w: -0.0032713753}
m_Size:
m_Target: 1.1984951
speed: 2
Expand Down
Binary file modified ResourceMonitor Unity Project/Library/LastBuild.buildreport
Binary file not shown.
Binary file modified ResourceMonitor Unity Project/Library/assetDatabase3
Binary file not shown.
16 changes: 1 addition & 15 deletions ResourceMonitor/Components/ItemButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace ResourceMonitor.Components
public class ItemButton : OnScreenButton, IPointerEnterHandler, IPointerExitHandler, IPointerClickHandler
{
private TechType type = TechType.None;
private int amount = 0;
public int Amount { set; get; }

public TechType Type
{
Expand All @@ -26,20 +26,6 @@ public TechType Type
}
}

public int Amount
{
set
{
TextLineTwo = "x" + value;
amount = value;
}

get
{
return amount;
}
}

public override void OnDisable()
{
base.OnDisable();
Expand Down
Loading

0 comments on commit 06109d6

Please sign in to comment.