public static void SetVariable(Cue cue, MyCueVariableEnum variableEnum, float value) { var varInfo = m_cueVariables[(int)variableEnum]; if (varInfo.VariableIndex == -1 || CacheEnabled == false) { varInfo.VariableIndex = cue.GetVariableIndex(varInfo.VariableName); m_cueVariables[(int)variableEnum].VariableIndex = varInfo.VariableIndex; } cue.SetVariable(varInfo.VariableIndex, value); }