Search Unity

ComponentDataWrapper - cannot resolve symbol

Discussion in 'Entity Component System' started by brianpkenney10, Feb 21, 2019.

  1. brianpkenney10

    brianpkenney10

    Joined:
    Nov 8, 2016
    Posts:
    27
    Doing an online tutorial to learn about ECS...I have an error that's driving me nuts!! My understanding that ComponentDataWrapper is derived from IComponentData? Tells me cannot resolve symbol of bold below. If it is old news. Any idea how to fix? What I am missing?

    Code:
    using System;
    using Unity.Entities;
    using UnityEngine;

    [Serializable]
    public struct BlockControllerData : IComponentData
    {

    public float rotateSpeed;
    public Vector3 rotatationDirection;

    }

    public class BlockControllerComponent : ComponentDataWrapper<BlockControllerData>
    {

    }
     
  2. brianpkenney10

    brianpkenney10

    Joined:
    Nov 8, 2016
    Posts:
    27
    I am using Entities 0.0.12 Preview 24
     
  3. JPrzemieniecki

    JPrzemieniecki

    Joined:
    Feb 7, 2013
    Posts:
    33
    All the *Wrapper were renamed to *Proxy in Preview 24.
     
    brianpkenney10 likes this.
  4. The-Exceptional-Bruce

    The-Exceptional-Bruce

    Joined:
    May 10, 2015
    Posts:
    29
    You may also want to move the BlockControllerComponent to it's own cs file. I couldn't add it to the GameObjectEntity until it was in a seperate file.
     
  5. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    Classic Unity rules still apply. MonoBehaviours (Proxies) need to be named the same as the file. So they can exist in the same file, the file just needs to be named after the Proxy not the ComponentData.

    I like to keep them together otherwise it becomes a huge mess but there are style guidelines that suggest always separating classes/structs into their own files.
     
    The-Exceptional-Bruce likes this.
  6. The-Exceptional-Bruce

    The-Exceptional-Bruce

    Joined:
    May 10, 2015
    Posts:
    29
    Confirmed and thanks.
     
  7. worm2019

    worm2019

    Joined:
    Mar 22, 2019
    Posts:
    3
    Hi,I am learning about ECS.And I have a error,how can I fix it?
    error CS0246: The type or namespace name 'ComponentDataWrapper<>' could not be found (are you missing a using directive or an assembly reference?)
     

    Attached Files:

  8. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,685
    It’s obsolete and renamed to ComponentDataProxy, but it’s deprecated too. Use new conversion pipeline.
     
  9. worm2019

    worm2019

    Joined:
    Mar 22, 2019
    Posts:
    3
    Thank you .
    Where can I find the new pipeline related documents?
     
  10. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,685
  11. worm2019

    worm2019

    Joined:
    Mar 22, 2019
    Posts:
    3