Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

[Solved] ECS System Invalid Cast

Discussion in 'Input System' started by hard_code, May 15, 2020.

  1. hard_code


    Aug 29, 2013
    [SOLVED] Got bit by the stupid same types in different namespaces again. Fixed it by making it an UnityEnigine.Vector2

    When trying to use the new input system from within an ECS system I am getting the following error when trying to read a vector2 from the context.ReadValue<Vector2>()

    My code is basically the exact same as this sample

    When i do the exact same thing in a monobehavior it works fine. Anyone know why in an ecs system it cant cast to a vector2?

    Edit: Latest packages all around and on 2020.1.b8
    Last edited: May 15, 2020