Merge pull request #347 from IvanPragma/patch-1

Fix SharedObjects
This commit is contained in:
Eric Froemling 2022-02-09 18:16:51 -06:00 committed by GitHub
commit 28c51a119f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@ class SharedObjects:
def __init__(self) -> None:
activity = ba.getactivity()
if hasattr(activity, self._STORENAME):
if self._STORENAME in activity.customdata:
raise RuntimeError('Use SharedObjects.get() to fetch the'
' shared instance for this activity.')
self._object_material: Optional[ba.Material] = None