Keyboard not responding to setting a color
Corpyz opened this issue · 4 comments
using Corale.Colore.Core;
using Corale.Colore.Razer.Keyboard;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using ColoreColor = Corale.Colore.Core.Color;
public class Razer : MonoBehaviour
{
private void Start()
{
Debug.Log("start");
Chroma.Instance.Keyboard.SetKey(Key.A, ColoreColor.Red);
Debug.Log("did it color?");
}
}
Nothing happens if I turn the code on, I tried to follow this video : Click! and when I copy his code, everything perfectly works, tried to dissolve the code just a little bit because I just need some simple codes like : Set W to red and S to blue, etc, etc.
Any help? :(
Not too familiar with how Unity code runs, but in that method it looks like it's possible the Colore instance gets garbage collected once Start()
exits which would de-initialize the system and reset back to the Synapse-configured values.
If you delay the exit of Start()
just to test, does that make any difference?
Though as long as the application is still running it should work as Colore initializes a global singleton that is alive for the same duration as the main program.
Thanks for the fast answer, nothing really works at all in my situation. if I try the code that I linked with youtube, everything works perfectly, but if I just want to initialize simple keyboard press LED it kinda freezes on my keyboard. Im pretty sure Getting Started doesnt really work either
What's the difference between Start()
and OnEnable()
in Unity, and does anything happen if you set key colors in the Update
methods?
Closing due to lack of response.