Any reason not to expose print and printErr arguments via ConfigurableUnityArguments
?
#547
Unanswered
killergerbah
asked this question in
Question and Answer
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
On my project I would like to be able to log
stdout
andstderr
messages that come from the Unity module. However the current implementation ofreact-unity-webgl
overridesprint
andprintErr
arguments tocreateUnityInstance
with no-op functions (which is preventing those messages from being logged to console). I see that there is an old TODO to "intercept print events and send them to the unity context instead," so it seems like there is a plan to implement these functions in a special way, however why isn't it acceptable to simply make these functions configurable by exposing them viaConfigurableUnityArguments
? That should provide the flexibility that applications would ever need. Here is a POC that demonstrates this change: https://github.com/killergerbah/react-unity-webgl/compare/main...killergerbah:react-unity-webgl:expose-print-functions?expand=1Beta Was this translation helpful? Give feedback.
All reactions