Closed ValakhP closed 7 years ago
Thanks, I actually missed a negation operator.
It should be
if (m_roleType != typeof(TRole) || !roleInfo.TryGetRoleByName(m_roleValueName, out role))
meaning that returns invalid if role type not match or the value string not found in roleInfo.
Oh, yeah. My bad. Anyway nice to have it fixed.
When using
ViveRoleProperty.ToRole<TRole>()
, it returnsInvalid
everytime.I guess, that the problem is in line 167:
if (m_roleType != typeof(TRole) || roleInfo.TryGetRoleByName(m_roleValueName, out role))
You have
m_roleValueName
parameter in method that is getting the role from Dictionary. After replacing it withm_roleTypeFullName
everything works fine.