disallow_multiple

函数位于 Infernux.components
disallow_multiple()  Union[Type, Callable]

描述

Prevent multiple instances of this component on a GameObject.

Usable with or without parentheses::

@disallow_multiple
class MySingleton(InxComponent): ...

@disallow_multiple()
class MySingleton(InxComponent): ...

description

示例

example

# TODO: Add example for disallow_multiple