Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetName()

Get the name of the world, or "World #N" where N is the _index when no name has been set. The _defaultWorld is always named "Default World".
Read time 1 minuteLast updated 17 days ago

Definition

  • Type: Method
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public string GetName()

Returns

Type

Description

stringThe name of the world.

Remarks

A new string is allocated each call, as with any API returning a string such as ToString. See PhysicsWorld.SetName.