Skip to content

Commit 571a04b

Browse files
committed
fix: Floating period, "arbitrary", "important":
- PR review change requests - Additionally: hasUpdatedRecently fix and reformatting
1 parent 45cc2d2 commit 571a04b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/unity/part-1.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ This tutorial has been tested against UnityEngine version 2022.3.4f1. This tutor
1515
This project is separated into two sub-projects;
1616

1717
1. Server (module) code
18-
2. Client code.
18+
2. Client code
1919

20-
First, we'll create an arbitrarily-named project root directory:
20+
First, we'll create a project root directory (you can choose the name):
2121

2222
```bash
2323
mkdir SpacetimeDBUnityTutorial
@@ -36,7 +36,7 @@ Open Unity and create a new project by selecting "New" from the Unity Hub or goi
3636

3737
![UnityHub-NewProject](/images/unity-tutorial/UnityHub-NewProject.JPG)
3838

39-
**⚠️ Ensure `3D (URP)` is selected** to properly render the materials in the scene!
39+
**⚠️ Important: Ensure `3D (URP)` is selected** to properly render the materials in the scene!
4040

4141
For Project Name use `client`. For Project Location make sure that you use your `SpacetimeDBUnityTutorial` directory. This is the directory that we created in a previous step.
4242

@@ -649,8 +649,8 @@ using SpacetimeDB;
649649
private float? lastUpdateTime;
650650
private void FixedUpdate()
651651
{
652-
bool hasUpdatedRecently = lastUpdateTime.HasValue &&
653-
Time.time - lastUpdateTime.Value > 1.0f / movementUpdateSpeed;
652+
float? deltaTime = Time.time - lastUpdateTime;
653+
bool hasUpdatedRecently = deltaTime.HasValue && deltaTime.Value < 1.0f / movementUpdateSpeed;
654654
bool isConnected = SpacetimeDBClient.instance.IsConnected();
655655

656656
if (hasUpdatedRecently || !isConnected)

0 commit comments

Comments
 (0)