Legacy Documentation: Version 2018.1 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Method group is Obsolete

NetworkTransport.GetAssetId

Obsolete public static string GetAssetId(GameObject go);

Parameters

goTarget GameObject to get assetId for.

Returns

string The assetId of the game object's prefab.

Description

The Unity Multiplayer spawning system uses assetIds to identify what remote objects to spawn. This function allows you to get the assetId for the prefab associated with an object.

Did you find this page useful? Please give it a rating: