Skip to main content

How to use SDK

Supported Unity Version

  • 6000.0.xx

Render Pipeline Compatibility

  • Built-in Render Pipeline
  • Universal Render Pipeline (URP)

Project Setup

  1. SDK Settings: Navigate to Assets -> ProjectP SDK Settings.
  2. Build Options:
    • Build and Save (Default): The build will be saved to a specified directory.
    • Build and Run: Requires setting the client executable path.

Notes

  • Model Uploads: Character or 3D model files can be uploaded directly to the runtime without using the SDK.
    • Supported Formats: .vrm, .fbx, .glTF

Character Creation

  1. Add Component: Attach the CharacterDesc.cs component to your character object.

img

  1. Prefab Creation: Configure your character, then right-click the prefab and select Build Character. This will compile and save the character files to the designated directory.

img

  1. Upload Character:
    • Launch the client, log in, and navigate to Menu -> Upload.
    • Upload the saved character files.
    • After a successful upload, the avatar will be added to your inventory.
    • Error Handling: If an error occurs in the script, the upload will fail. Check the error log at content/log/script_log.txt.

World Creation

  1. Add Component: Attach the WorldDesc.cs component to your scene.

img

  1. Save Scene: Enter the necessary content and save the scene.

  2. Build World: Right-click on the scene file and select Build World. The world will be compiled and saved to the designated directory.

  3. Upload Process:

    • Open the client, log in, and go to Menu -> Upload.
    • Upload the saved world files.
    • Once uploaded, the world will appear in your inventory.
  4. World Activation:

    • Open the P-Linker and log in.

img

  • Select the uploaded world item, configure the maximum number of participants, and click Apply to save your settings.
  • Toggle the activation button at the bottom right to make the world available in the game's world menu.

Item Creation

  1. Add Component: Attach the ItemDesc.cs component to your item object.

img

  1. Configure Item:

    • IsLocal: If checked, the item will only be visible to you.
    • Allow Drop: Allows the item to be dropped into the world.
    • Attach Point: Set this for wearable items. Non-wearable items should be set to None.
    • Position and Rotation: Set these for wearable items.
    • Custom GUI: Can be added through the Setting menu. Refer to the sample for more details.
  2. Prefab Creation: After configuring your item, right-click the prefab and select Build Item. The item will be compiled and saved to the designated directory.

  3. Upload Item:

    • Launch the client, log in, and navigate to Menu -> Upload.
    • Upload the saved item files.
    • After a successful upload, the item will be added to your inventory.

Synchronization

  • Synchronize Objects: Attach the AsncObject.cs component to any object you wish to synchronize.