Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

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

GameObject.isStatic

var isStatic: bool;
bool isStatic;
isStatic as bool

Description

Editor only API that specifies if a game object is static.

Returns true if any of the static flags are set (See Also: GameObjectUtility.SetStaticEditorFlags).

setting this to true sets all the static flags (See Also: GameObjectUtility.SetStaticEditorFlags).