Skip to content

Commit

Permalink
Disable chat menu in singleplayer
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellochner committed Jul 19, 2024
1 parent 72e12bb commit 86b9dbb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
22 changes: 11 additions & 11 deletions Assets/Game/Worlds/_Common/Prefabs/_Common.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -2710,7 +2710,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 2357531756323818975}
m_Direction: 2
m_Value: 0
m_Size: 0.9999876
m_Size: 0
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
Expand Down Expand Up @@ -4562,7 +4562,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -640}
m_AnchoredPosition: {x: 0, y: -639.58545}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!114 &1052292325924580216
Expand Down Expand Up @@ -11359,11 +11359,11 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 35098379388084152, guid: b467e61aa99c1c34db5b380336f87f92, type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 35098379388084152, guid: b467e61aa99c1c34db5b380336f87f92, type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 35098379388084152, guid: b467e61aa99c1c34db5b380336f87f92, type: 3}
propertyPath: m_SizeDelta.x
Expand All @@ -11379,7 +11379,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 35098379388084152, guid: b467e61aa99c1c34db5b380336f87f92, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -50
objectReference: {fileID: 0}
- target: {fileID: 1819941846573820241, guid: b467e61aa99c1c34db5b380336f87f92, type: 3}
propertyPath: m_SizeDelta.y
Expand Down Expand Up @@ -11521,11 +11521,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 1996618161552211297, guid: 85475157bf64f384fbc70517207134f8, type: 3}
propertyPath: m_CellSize.x
value: 101.875
value: -10
objectReference: {fileID: 0}
- target: {fileID: 1996618161552211297, guid: 85475157bf64f384fbc70517207134f8, type: 3}
propertyPath: m_CellSize.y
value: 101.875
value: -10
objectReference: {fileID: 0}
- target: {fileID: 1996618162104203962, guid: 85475157bf64f384fbc70517207134f8, type: 3}
propertyPath: m_AnchorMax.x
Expand All @@ -11545,11 +11545,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2006361328055433380, guid: 85475157bf64f384fbc70517207134f8, type: 3}
propertyPath: m_CellSize.x
value: 101.875
value: -10
objectReference: {fileID: 0}
- target: {fileID: 2006361328055433380, guid: 85475157bf64f384fbc70517207134f8, type: 3}
propertyPath: m_CellSize.y
value: 101.875
value: -10
objectReference: {fileID: 0}
- target: {fileID: 2006361328055433403, guid: 85475157bf64f384fbc70517207134f8, type: 3}
propertyPath: m_AnchoredPosition.y
Expand Down Expand Up @@ -11581,11 +11581,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 6412703712213967199, guid: 85475157bf64f384fbc70517207134f8, type: 3}
propertyPath: m_CellSize.x
value: 101.875
value: -10
objectReference: {fileID: 0}
- target: {fileID: 6412703712213967199, guid: 85475157bf64f384fbc70517207134f8, type: 3}
propertyPath: m_CellSize.y
value: 101.875
value: -10
objectReference: {fileID: 0}
- target: {fileID: 6412703712311687379, guid: 85475157bf64f384fbc70517207134f8, type: 3}
propertyPath: m_AnchorMax.x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ public void SetupSP()
}

Player.Instance.DeathMessenger.enabled = false;
PlayerChatManager.Instance.enabled = false;

EditorManager.Instance.CreativeMode = world.CreativeMode;
}
Expand Down
9 changes: 9 additions & 0 deletions Assets/Plugins/Internal/PlayerChat/PlayerChatManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ private void Update()
}
}

private void OnEnable()
{
sideMenu.gameObject.SetActive(true);
}
private void OnDisable()
{
sideMenu.gameObject.SetActive(false);
}

public void TrySendChatMessage()
{
string message = messageInputField.text.NoParse();
Expand Down

0 comments on commit 86b9dbb

Please sign in to comment.