Skip to content

Commit 4880d06

Browse files
authored
Merge pull request #41 from Chylum/docs/network-sync-scene-objects
Documentation: Remove unused images and polish writing based on feedback
2 parents 39ed6dc + 37fef9a commit 4880d06

13 files changed

Lines changed: 40 additions & 20 deletions

File tree

content/docs/world/props.mdx

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,28 @@ import { Callout } from 'fumadocs-ui/components/callout';
66

77
## What Are Props?
88

9-
Props are interactive objects which can be loaded into a Basis scene and synchronised across a network.
9+
Props are interactive objects which can be loaded into a Basis scene and optionally synchronised across a network.
1010

1111
## How to Create a Prop
1212

13-
- Select a game object and add a Basis Prop component to it.
13+
- Select a Gameobject and add a Basis Prop component to it.
1414
- Enter an Asset Bundle Name.
1515
- Optionally, add an Asset Bundle Description.
1616
- Press the 'Create Prop Bee File' button and wait for this process to complete.
1717

18-
![Inspector Window at Armature Gameobject](/img/props/1-.png)
18+
![Inspector Window showing Basis Prop component](/img/props/1.png)
1919

2020
- The results will be opened in a new window automatically as shown below.
2121

22-
![Inspector Window at Armature Gameobject](/img/props/3.png)
22+
![Directory location of the generated prop .bee file](/img/props/3.png)
2323

2424
## How to Create a Network Synced Prop
2525

2626
Props can be network synced and generated at runtime. Below is example of how to load a network synced Pickup Interactable cube:
2727

2828
- Add a cube object in the scene hierarchy.
2929

30-
![Inspector Window at Cube](/img/props/2AA.png)
30+
![Inspector Window at Cube](/img/props/2A.png)
3131

3232
- Add a Basis Pickup Interactable component. This allows a local player to pick up and move the cube.
3333

@@ -39,55 +39,75 @@ Props can be network synced and generated at runtime. Below is example of how to
3939

4040
- Add a Basis Prop component, enter an Asset Bundle Name and press the 'Create Prop Bee File' button. The generated .bee files will be used by the Basis Runtime Loader to load the network synced cube into a scene.
4141

42-
![Inspector Window at Basic Object Sync Networking component](/img/props/2D.png)
42+
![Inspector Window showing Basis Prop component](/img/props/2D.png)
4343

4444
### Spawning the Prop into a Scene Using the Runtime Loader
4545

46-
- Create an empty game object and give it a suitable name.
46+
- Create an empty Gameobject and give it a suitable name.
4747

4848
- Attach the Runtime Loader component to it.
4949

5050
- Enter your generated prop password and .bee url.
5151

5252
- Select Persistent to ensure synced changes persist for late-joining players.
5353

54-
![Inspector Window at Basic Object Sync Networking component](/img/props/3A.png)
54+
![Inspector Window showing Runtime Loader](/img/props/3A.png)
5555

5656
- In the Unity Editor toolbar, select Basis and click on the Loadable Config Editor. This Basis config editor is used to genertate XML files which Basis can use to spawn props into a scene.
5757

58-
![Inspector Window at Basic Object Sync Networking component](/img/props/4B-.png)
58+
![Unity toolbar showing Basis Loadable Config Editor setting](/img/props/4A.png)
5959

60-
- Enter 0 for the mode value. The 0 simply means that this is a loadable prop.
60+
- Enter 0 for the mode value. The 0 simply means that this is a loadable prop (a mode value of 1 is used for scenes).
6161

6262
- Enter the same generated password and .bee url used previously.
6363

6464
- Select Persist to ensure synced changes persist for late-joining players.
6565

6666
- Click 'Save XML' and enter an appropriate file name to generate an XML file for the network synced pickup cube
6767

68-
![Inspector Window at Basic Object Sync Networking component](/img/props/4C.png)
68+
![Inspector window of Basis Config](/img/props/4B.png)
6969

7070
- The generated XML will be located in: *Basis\Basis Server\BasisServerConsole\bin\Debug\net9.0\initialresources*
7171

72-
![Inspector Window at Basic Object Sync Networking component](/img/props/4D.png)
72+
![Location of generated XML output](/img/props/4C.png)
7373

7474
- Its output should look something like this:
7575

76-
![Inspector Window at Basic Object Sync Networking component](/img/props/4E.png)
76+
```xml title="PropDemo.xml"
77+
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
78+
<BasisLoadableConfiguration>
79+
<!-- Mode of the configuration --><Mode>0</Mode>
80+
<!-- Network ID --><LoadedNetID></LoadedNetID>
81+
<!-- Unlock password --><UnlockPassword><GENERATED-BEE-PASSWORD></UnlockPassword>
82+
<!-- Combined URL --><CombinedURL><GENERATED-BEE-URL></CombinedURL>
83+
<!-- Local load flag --><IsLocalLoad>false</IsLocalLoad>
84+
85+
<!-- Position values --><PositionX>0</PositionX><PositionY>0</PositionY><PositionZ>0</PositionZ>
86+
87+
<!-- Quaternion values --><QuaternionX>0</QuaternionX><QuaternionY>0</QuaternionY><QuaternionZ>0</QuaternionZ><QuaternionW>0</QuaternionW>
88+
89+
<!-- Scale values --><ScaleX>1</ScaleX><ScaleY>1</ScaleY><ScaleZ>1</ScaleZ>
90+
91+
<!-- Persist flag --><Persist>true</Persist>
92+
</BasisLoadableConfiguration>
93+
```
7794

7895
### Checking the Server to Confirm the Prop Loads
7996

8097
- You can check if your prop is loaded correctly by the server. To do so, run the *BasisNetworkConsole.exe*, which is located at *Basis\Basis Server\BasisServerConsole\bin\Debug\net9.0*.
8198

82-
- *Note:*
83-
- You will need to register yourself as an admin for the prop to be able to load. You can do this by entering entering the command */admin add* did:key:\<YOUR-KEY\> or by editing *Basis\Basis Server\BasisServerConsole\bin\Debug\net9.0\config\admins.xml*.
84-
- You can find your key by opening up the Basis application and selecting your player's UUID in the Admin settings.
99+
<Callout type="info">
100+
You will need to register yourself as an admin for the prop to be able to load. You can do this by entering entering the command */admin add* did:key:\<YOUR-KEY\> or by editing *Basis\Basis Server\BasisServerConsole\bin\Debug\net9.0\config\admins.xml*.
101+
102+
You can find your key by opening up the Basis application and selecting your player's UUID in the Admin settings.
103+
</Callout>
104+
85105

86-
![Inspector Window at Basic Object Sync Networking component](/img/props/5A.png)
106+
![Server terminal output](/img/props/5A.png)
87107

88108
### Setting up the Basis Scene and Testing the Pickup Cube
89109

90-
- Before you can test out the network synced pickup cube, ensure that your scene has a Basis Scene component attached to an empty game object.
110+
- Before you can test out the network synced pickup cube, ensure that your scene has a Basis Scene component attached to an empty Gameobject.
91111

92112
- Click 'Create Scene Bee File'.
93113

@@ -97,8 +117,8 @@ Props can be network synced and generated at runtime. Below is example of how to
97117

98118
- Ensure Persistent is selected so that synced changes persist for late-joining players.
99119

100-
![Inspector Window at Basic Object Sync Networking component](/img/props/5B.png)
120+
![Inspector Window for load config](/img/props/5B.png)
101121

102122
- Open up the 'Initialization' scene and press play. This initialises the created scene and network objects. The next time when you load the scene through the server while running the basis application, all players will be able to interact with the network synced cube.
103123

104-
![Inspector Window at Basic Object Sync Networking component](/img/props/5C.png)
124+
![Desktop Steam two game windows showing synced cube](/img/props/5C.png)

public/img/props/1-.png

-14.9 KB
Binary file not shown.

public/img/props/1.png

-1.99 KB
Loading

public/img/props/2.png

-12.5 KB
Binary file not shown.

public/img/props/2A.png

81.8 KB
Loading

public/img/props/2AA.png

-107 KB
Binary file not shown.

public/img/props/4.png

-16.8 KB
Binary file not shown.

public/img/props/4A.png

-7.6 KB
Loading

public/img/props/4B-.png

-82.7 KB
Binary file not shown.

public/img/props/4B.png

-36.5 KB
Loading

0 commit comments

Comments
 (0)