- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LLMClient Initialization Issue with OnEnable #20
Comments
Thank you for the contribution 👏 ! |
Thanks, about the start function is a great point! I am unsure is moving to awake is the best. What I was also thinking was maybe to create a setting like |
Good point. I don't think there is a way to pass an argument when adding a component dynamically though (with |
@BruceKristelijn this is now merged in v1.0.2! |
Hi there. I have tried implementing the project and it works very good so far. Thanks and props to you!
However in our project we create LLMClient's dynamically using
AddComponent
. However the usage ofOnEnable
causes some issues with this.OnEnable
is called immediately whengamobject.AddComponent
is called. Because of this settings the prompt has some issues.I had this issue with Unity's own AudioSources aswell and a workaround I use is turning the game object off, adding the component and turning the gameobject on again.
I would suggest using
Awake
or theStart
methods instead ofOnEnable
as there is no behaviour likeOnDisable
.The text was updated successfully, but these errors were encountered: