pyunity.render module¶
Classes to aid in rendering in a Scene.
-
class
pyunity.render.Camera(transform)[source]¶ Bases:
pyunity.core.SingleComponentComponent to hold data about the camera in a scene.
-
fov¶ Fov in degrees measured horizontally. Defaults to 90.
Type: int
-
near¶ Distance of the near plane in the camera frustrum. Defaults to 0.05.
Type: float
-
far¶ Distance of the far plane in the camera frustrum. Defaults to 100.
Type: float
-
AddComponent(component)¶ Calls AddComponent on the component’s GameObject.
Parameters: component (Component) – Component to add. Must inherit from Component
-
GetComponent(component)¶ Calls GetComponent on the component’s GameObject.
Parameters: componentClass (Component) – Component to get. Must inherit from Component
-
GetComponents(component)¶ Calls GetComponents on the component’s GameObject.
Parameters: componentClass (Component) – Component to get. Must inherit from Component
-
RemoveComponent(component)¶ Calls RemoveComponent on the component’s GameObject.
Parameters: component (Component) – Component to remove. Must inherit from Component
-
-
pyunity.render.convert(type, list)[source]¶ Converts a Python array to a C type from
ctypes.Parameters: - type (_ctypes.PyCSimpleType) – Type to cast to.
- list (list) – List to cast
Returns: A C array
Return type: Any