Skip to main content

OMG Tip #17: Player Gameobject

Player gameobject contains most of the logic provided by Somnium in your world. There is no easy way to get a reference for it.

  1. For the local players get the main camera and then get its root game object. That will be your player gameobject.
  2. For other players in the scene iterate over root gameobjects of the scene and look for objects named like this Player [PlayerName] [PlayerNumber] (e.g. "Player [MyName] [1234])

#omg #omgtips #worldbuilding #gamedev #playergameobject

Authencity. collection image

Personal on-chain identity backed by Ethereum blockchain.

Contract Address0xcbd4...3517
Token ID8465
Token StandardERC-721
ChainEthereum
Last Updated2 years ago
Creator Earnings
10%

Authencity publication by (@omg)

#
5,216
visibility
1 view
  • Price
    USD Price
    Quantity
    Expiration
    From
  • Price
    USD Price
    Quantity
    Floor Difference
    Expiration
    From
keyboard_arrow_down
Event
Price
From
To
Date

Authencity publication by (@omg)

#
5,216
visibility
1 view
  • Price
    USD Price
    Quantity
    Expiration
    From
  • Price
    USD Price
    Quantity
    Floor Difference
    Expiration
    From

OMG Tip #17: Player Gameobject

Player gameobject contains most of the logic provided by Somnium in your world. There is no easy way to get a reference for it.

  1. For the local players get the main camera and then get its root game object. That will be your player gameobject.
  2. For other players in the scene iterate over root gameobjects of the scene and look for objects named like this Player [PlayerName] [PlayerNumber] (e.g. "Player [MyName] [1234])

#omg #omgtips #worldbuilding #gamedev #playergameobject

Authencity. collection image

Personal on-chain identity backed by Ethereum blockchain.

Contract Address0xcbd4...3517
Token ID8465
Token StandardERC-721
ChainEthereum
Last Updated2 years ago
Creator Earnings
10%
keyboard_arrow_down
Event
Price
From
To
Date