Skip to content
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

irc.JoinChannel() throws an exception #20

Open
xThuby opened this issue Oct 30, 2023 · 0 comments
Open

irc.JoinChannel() throws an exception #20

xThuby opened this issue Oct 30, 2023 · 0 comments

Comments

@xThuby
Copy link

xThuby commented Oct 30, 2023

While playing around with this plugin I found that this exception gets thrown when trying to use irc.JoinChannel()
I passed in a string with a valid twitch channel name.

NullReferenceException: Object reference not set to an instance of an object
Lexone.UnityTwitchChat.IRC.JoinChannel (System.String channel) (at ./Library/PackageCache/com.lexonegit.unity-twitch-chat@1645b38432/Runtime/IRC.cs:307)
PrepScreenManager.ConnectIRC () (at Assets/Scripts/UI/PrepScreenManager.cs:105)
UnityEngine.Events.InvokableCall.Invoke () (at <10871f9e312b442cb78b9b97db88fdcb>:0)
UnityEngine.Events.UnityEvent.Invoke () (at <10871f9e312b442cb78b9b97db88fdcb>:0)
UnityEngine.UI.Button.Press () (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Button.cs:70)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Button.cs:114)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:57)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:272)
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
Rewired.Integration.UnityUI.RewiredStandaloneInputModule:ProcessMousePress(MouseButtonEventData) (at Assets/Rewired/Integration/UnityUI/RewiredStandaloneInputModule.cs:1091)
Rewired.Integration.UnityUI.RewiredStandaloneInputModule:ProcessMouseEvent(Int32, Int32) (at Assets/Rewired/Integration/UnityUI/RewiredStandaloneInputModule.cs:992)
Rewired.Integration.UnityUI.RewiredStandaloneInputModule:ProcessMouseEvents() (at Assets/Rewired/Integration/UnityUI/RewiredStandaloneInputModule.cs:976)
Rewired.Integration.UnityUI.RewiredStandaloneInputModule:Process() (at Assets/Rewired/Integration/UnityUI/RewiredStandaloneInputModule.cs:690)
UnityEngine.EventSystems.EventSystem:Update()
Rewired.Integration.UnityUI.RewiredEventSystem:Update() (at Assets/Rewired/Integration/UnityUI/RewiredEventSystem.cs:40)
    public void ConnectIRC()
    {
        // irc.channel = twitchChannelName;
        irc.JoinChannel(twitchChannelName);
        connectButton.interactable = false;
    }

This method gets called from a button press event using the Unity UI system.
I am also using Rewired, which is why it's mentioned a lot in the exception. I don't know if Rewired has anything to do with this error, but I thought it was good to mention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant