Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 0 additions & 92 deletions .editorconfig

This file was deleted.

63 changes: 0 additions & 63 deletions .gitattributes

This file was deleted.

4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
labels: stat:awaiting triage, type:bug
assignees: ''

---
Expand All @@ -27,7 +27,7 @@ If applicable, add screenshots to help explain your problem.
- OS: [e.g. Windows 10]
- Unity Version: [e.g. 2019.1]
- MLAPI Version: [e.g. v6.0.1]
- MLAPI Commit: [e.g. https://github.com/MidLevel/MLAPI/commit/c102935df1d7e0928283b48948fe96e5d96dd961]
- MLAPI Commit: [e.g. https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/commit/c102935df1d7e0928283b48948fe96e5d96dd961]

**Additional context**
Add any other context about the problem here.
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: True
contact_links:
- name: Documentation
url: https://github.com/Unity-Technologies/com.unity.multiplayer.docs/issues
about: Create a documentation issue in our docs repository.
- name: Discord
url: https://discord.gg/buMxnnPvTb
about: Join us on Discord for questions, support and discussions.
- name: Unity Multiplayer Forum
url: https://forum.unity.com/forums/multiplayer.26/
about: Create a thread in the Unity Multiplayer Forum.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
labels: stat:awaiting triage, type:feature
assignees: ''

---
Expand Down
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/feedback.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Feedback
about: Provide feedback to the MLAPI team
title: ''
labels: stat:awaiting triage, type:feedback
assignees: ''

---

**Feedback**
Enter your feedback to the MLAPI team here. Please keep in mind that our teams focus is on multiplayer development. For other non-networking related feedback towards Unity please use the Forums.

**Suggested Changes**
If you think we could do something better, please let us know here what you would like us to change. Concrete and constructive suggestions are welcome and will help us to prioritize and act on feedback.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/other-issues.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Other Issues
about: Use this template for any other non-support related issues
title: ''
labels: stat:awaiting triage
assignees: ''

---

This template is for issues not covered by the other issue categories.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/rfc-tracking-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: RFC Tracking Issue
about: Track the development of a RFC
title: 'Track RFC #<pr-number>: <description>'
labels: type:rfc
assignees: ''

---

Tracking issue for [RFC #<pr-number>: <description>](https://github.com/Unity-Technologies/com.unity.multiplayer.rfcs/pull/<pr-number>)
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Support
about: Have a question or need help with anything?
title: ''
labels: stat:awaiting triage, type:support
assignees: ''

---

Post your questions or problems here.

For general questions, networking advice or discussions about MLAPI, you can also reach us on our [Discord Community](https://discord.gg/FM8SE9E) or create a post in the [Unity Multiplayer Forum](https://forum.unity.com/forums/multiplayer.26/).
30 changes: 15 additions & 15 deletions com.unity.multiplayer.mlapi/Tests/Runtime/TickSystemTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace MLAPI.RuntimeTests
public class TickSystemTests: IDisposable
{
private NetworkTickSystem m_TickSystem = null;
private float m_TestDuration = 5.0f;
private float m_TestDuration = 3.0f;
private float m_SleepInterval = 0.001f;
private float m_TickInterval = 0.010f;

Expand All @@ -25,27 +25,27 @@ public IEnumerator VerifyTickSystem()
{
m_TickSystem = new NetworkTickSystem(m_TickInterval);

ushort tick0 = m_TickSystem.GetTick();
ushort lastTick = tick0;
float t0 = Time.unscaledTime;
float t1;
var startTick = m_TickSystem.GetTick();
var startTime = Time.unscaledTime;

var lastTick = startTick;
do
{
t1 = Time.unscaledTime;
ushort tick = m_TickSystem.GetTick();
var currentTick = m_TickSystem.GetTick();
Assert.IsTrue(currentTick >= lastTick); // check monotonicity of ticks
lastTick = currentTick;

Assert.IsTrue(tick >= lastTick); // check monotonicity of ticks

lastTick = tick;
yield return new WaitForSeconds(m_SleepInterval);
} while (t1 - t0 <= m_TestDuration);
} while (Time.unscaledTime - startTime <= m_TestDuration);

var endTick = m_TickSystem.GetTick();
var endTime = Time.unscaledTime;

int ticks = lastTick - tick0;
int expectedTicks = (int)(m_TestDuration / m_TickInterval);
var elapsedTicks = endTick - startTick;
var elapsedTime = endTime - startTime;

// check overall number of ticks is within one tick of the expected value
Assert.IsTrue(Math.Abs(expectedTicks - ticks) < 2);
var elapsedTicksExpected = (int)(elapsedTime / m_TickInterval);
Assert.Less(Math.Abs(elapsedTicksExpected - elapsedTicks), 2); // +/- 1 is OK
}
}
}