Game Object: getPropertyNames

getPropertyNames()
  • Returns a list of the names of the properties you added to the object.

Return Type:

  • list [ string ]
Sample Code

################### get a list of the property names
  

# import bge
import bge

# get controller
cont = bge.logic.getCurrentController()

# get object that controller is attached to
obj = cont.owner

# get a list of the property names
propertyList = obj.getPropertyNames()