- Home /
Invalid Cast exception makes no sense
This line throws an invalid cast exception... I don't understand why. There is nothing to convert/cast. This line is in the TurnManager class. I am trying to have the TurnManager own a TurnOrderQueue
public TurnOrderQueueNS.TurnOrderQueue<IActor> TurnOrder = new TurnOrderQueueNS.TurnOrderQueue<IActor>();
Throws this exception: InvalidCastException: Cannot cast from source type to destination type. TurnOrderQueueNS.TurnOrderQueue`1[IActor]..ctor () TurnManager..ctor ()
Your answer
Follow this Question
Related Questions
What happens if PlayerPrefs.Save() fails? 1 Answer
Unity seems to be silently suppressing exception dialogs, and showing no messages. Why is that? 1 Answer
Random Unrelated Exceptions thrown in WebGL Build (unity 2018) 1 Answer
Unity array out of range exception, using photon unity network. 1 Answer
I'm having issue with following stack trace. I can't understand what's causing that. 0 Answers