Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Unity First batch of 2D Features for Project Tiny 0.22 is now available

Discussion in 'Project Tiny' started by rustum, Feb 18, 2020.

Thread Status:
Not open for further replies.
  1. rustum

    rustum

    Unity Technologies

    Joined:
    Feb 14, 2015
    Posts:
    110
    2D Foundational Features for Project Tiny 0.22

    We are releasing the first batch of 2D features for Project Tiny!

    Important Note: This release is targeted for Tiny 0.22 only. This means that trying to use 2D Entities with other versions of Tiny will not work at this time.

    This is a foundational set of 2D features. As such it is focused on supporting basic rendering of sprites and collision detection in 2D.

    Rendering
    • Sprite conversion
    • Sprite Renderer conversion
    • Sprites/Default Material conversion
    • Sprite Atlas conversion
    • Runtime 2D rendering pipeline
    • Editor 2D rendering pipeline
    Physical Collision Detection
    • Primitive colliders conversion
    • Compound collider conversion
    • Rigidbody2D conversion
    • Physics broadphase
    • Broadphase querying API

    Playable Demos:
    Tiny Gems.png
    Play Tiny Gems

    Tiny Spaceship.png
    Play Tiny Spaceship

    Getting Started:
    Here's a preconfigured project to get you started quickly:
    2D Entities Starter

    Samples:

    The source projects for the playable demos above are also available for you to explore. Find them here:
    Project Tiny Samples

    Documentation:
    For more detailed instructions on how to use 2D entities see the package docs here:
    2D Entities Package Docs

    Please share your experience with the tools by replying to this post or creating a new one. How does this feature help you achieve your desired outcomes? What works as expected? And what doesn’t? We’re excited to hear back from you!

    We will be curating answers to frequently asked questions in the discussion.
     
    Last edited: Mar 6, 2020
    Lightning_A, atimurn, Jalol and 9 others like this.
  2. rustum

    rustum

    Unity Technologies

    Joined:
    Feb 14, 2015
    Posts:
    110
    Known issues
    • The aspect ratio is fixed at 16:9
      • Frustum culling is done in a 16:9 frustum
      • Projection matrix is locked at a 16:9 aspect ratio
    • In the editor, the audio will not be played when triggered
    • You have to keep the Main Camera SubScene open in Edit mode at all times to see anything being rendered in the GameView window
    • There is a max string length to the build path
    • Sharing assets between SubScenes is currently not supported
    • Adding a dot (.) in the runtime assembly definition will cause the Run Build action to fail for android
    • Adding spaces in the Build Settings filename will cause the build pipeline to fail building
    • In the editor during Play Mode, the Scene View will not visualise the contents of a SubScene correctly, if the SubScene is in Edit Mode.
    • You must decorate your converter with the
      ConverterVersion
      attribute. You should increment the version number every time you change the converter.
    • The Profiler, Entity Debugger, Frame Debugger can be used within the Editor but cannot be connected to Project Tiny builds.
    • Batching results will differ between editor and Project Tiny builds because they don't share the same render pipeline.
     
    Last edited: Mar 6, 2020
  3. rustum

    rustum

    Unity Technologies

    Joined:
    Feb 14, 2015
    Posts:
    110
    Common Questions

    For general information regarding Project Tiny, see the Project Tiny documentation.

    I drag-and-dropped a Sprite from Project to the Scene View and when I build the player the Sprite does not display.
    A sprite must be inside a SubScene for it to be converted and displayed in a build. If you created the Sprite by dragging and dropping it from the Project view to the Scene, you will still need to move it into one of the SubScenes in your hierarchy.


    I have a system that operates on a Rotation Component and I noticed that during Play Mode in the editor my Sprite doesn't rotate.
    The GameObject that contains the transform component, must be inside a SubScene for it to be converted and operated on by a system.


    During Play Mode in the editor, I noticed that if a SubScene is in Edit Mode, the Scene View doesn't visualise its contents correctly.
    A SubScene needs to be closed during Play Mode to ensure its contents are displayed correctly. The one exception to this is the SubScene that contains the Main Camera. This SubScene should always be in Edit Mode, otherwise the Game View will not render anything.

    I am seeing the following warning after compilation has finished

    Assembly for Assembly Definition File '[asmdef filename] will not be compiled, because it has no scripts associated with it.

    This warning is issued if Unity detects that an assembly does not contain any scripts. This is commonly seen in Tiny projects without any scripts.


    I am seeing the following error when I build

    Build [Build Settings Name] failed in BuildStepGenerateBeeFiles after [x]s.
    Could not find a part of the path

    This is most likely caused by the project being located on a too long path in disk. Try to shorten the path, i.e. C:/Projects/MyTinyProject/


    I am seeing the following error when I build
    Build [BuildSetting] failed in BuildStepRunBee after [x]s.
    ...
    [Project]/Library/PackageCache/com.unity.dots.runtime@0.22.0-preview.3/bee~/BuildProgramSources/BuildProgram.bee.cs:448: error: Program ../../Builds/[BuildSettings]/[ProjectAssembly].dll is an executable-like thing, but doesn't reference anything with Main (System.InvalidProgramException)

    The build system cannot find the Tiny assemblies. Make sure that Use GUID is deselected in your runtime .asmdef, and try again.


    I am seeing the following error when I build

    Build [BuildSetting] failed in BuildStepRunBee after [x]s.
    tundra: error: unable to map [BuildSetting] to any named node or input/output file
    stevedore: warning: unrecognized config setting: retries

    Make sure your root assembly definitions (Root Assembly) name in the name field matches the file name.


    I am seeing the following error when building on MacOS
    Build <NameOfBuild> failed in BuildStepRunBee after X.XXs.
    [E] DAG generator driver failed: mono --debug ...
    error: Object reference not set to an instance of an object (System.NullReferenceException)
    at Bee.Toolchain.IOS.IOSToolchain..ctor
    at Bee.Toolchain.IOS.IOSAppToolchain..ctor

    Before creating an iOS build for the first time, follow these steps to make sure everything is setup correctly.

    1. Open the terminal
    2. Enter xcode-select -p
    3. Ensure /Applications/Xcode.app/Contents/Developer is printed
    4. If it is not, enter sudo xcode-select -r
    5. Enter xcode-select -p to ensure that you now get the expected output

    I set the background color of the camera, but in the build the background is black
    Make sure to set the background colors alpha to 1


    My authoring/conversion scripts does not convert the data exactly how I written it in the authoring script
    The converted result is cached to speed up the development process. To update the conversion cache, make sure to add a ConverterVersion- attribute above your conversion class, and increment the version for every change you make.
     
    Jalol, VitDev and LeneAzlan like this.
  4. DeveloperTechno

    DeveloperTechno

    Joined:
    Apr 30, 2019
    Posts:
    4
    The long-awaited 2D ! That's excellent!
    I will try it!:)
     
  5. DeveloperTechno

    DeveloperTechno

    Joined:
    Apr 30, 2019
    Posts:
    4
    I checked the operation on my device.

    Windows10:
    Very slow in Chrome browser.
    No problem with FireFox.

    iOS: There was no problem with Safari, Chrome, and Firefox.


    I don't have a Mac so I can't really verify it, but I've received reports that it's working fine with Chrome on Mac.
     
    Ted_Wikman likes this.
  6. eabelard

    eabelard

    Joined:
    Jul 3, 2012
    Posts:
    6
    We've been waiting for this one thank you:)
     
  7. ChrisJD

    ChrisJD

    Joined:
    Aug 11, 2013
    Posts:
    3
    Use GUID is deselected and I keep getting the same error. I've deleted and recreated the Gamesystems Assembly definition a couple of times with no change. This is following these instructions https://docs.google.com/document/d/...HfnAX-CpYLK3aOdwA/edit#heading=h.aqkdu3yh7hij

    Are there any other possible causes?

    New URP project. Tiny Project 0.22.0 package installed. Unity 2019.3.4f1
     
  8. ColossalPaul

    ColossalPaul

    Unity Technologies

    Joined:
    May 1, 2013
    Posts:
    171
    Are you creating a project from scratch or did you use the Starter Kit?
     
  9. ChrisJD

    ChrisJD

    Joined:
    Aug 11, 2013
    Posts:
    3
    I created a project from scratch. I just compared what I had to the starter kit (which does work) and through some educated guess work figured out that a critical assembly reference was missing (Unity.Tiny.EntryPoint). This is not listed in the list of required assembly definitions in the doc I linked to.

    I had an error prior to this one that said "Warning: UseBurst specified, but target does not support burst yet. Not using burst." so I disabled burst which got me to the "executable like-thing" error. I'm doing a Windows.Net Devlop buiild. Now that the EntryPoint reference is added I've been able to re-enable the "use burst" option without any problems. So that must have been a symptom of the same missing reference.

    So problem solved. But the getting started docs might need updating to reflect the need to include Unity.Tiny.EntryPoint (or an explanation of when it needs to be included?).
     
    Last edited: Mar 7, 2020
  10. ColossalPaul

    ColossalPaul

    Unity Technologies

    Joined:
    May 1, 2013
    Posts:
    171
    thanks for the feedback. We'll make sure it gets updated...
     
  11. elliotc-unity

    elliotc-unity

    Unity Technologies

    Joined:
    Nov 5, 2015
    Posts:
    54
    That requirement will also be lifted in tiny 0.23, fwiw.
     
  12. BanJaxe

    BanJaxe

    Joined:
    Nov 20, 2017
    Posts:
    47
    Is it your plan that this 2D Entities package will always be dependant on Project Tiny? Or will you seperate them in a future release?
     
    GliderGuy likes this.
  13. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    214
    The current plan is to have 2D Entities depend on Project Tiny. Do you have any use case in mind where 2D Entities have a different dependency structure?
     
  14. BanJaxe

    BanJaxe

    Joined:
    Nov 20, 2017
    Posts:
    47
    I don't really have a specific project in mind, but the standard Entities package is not dependant on Tiny so I was expecting the 2D Entities package to be the same. Other parts of DOTS support the "Hybrid" workflow where you can mix legacy APIs and GameObjects with Entities, so it seems odd to me that specificlly 2D Entities would only support the "Pure" workflow. Maybe I am thinking about it wrong but it seems like the choice of 3D or 2D should be seperate from the choice of Hybrid/Pure.
     
  15. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    214
    Right now our focus is to continue develop our 2d pipeline on top of dots runtime/project tiny.
    We have had internal discussions on whether or not we should add support for "hybrid" dots, but right now it is not a very high priority.

    If we hear more users telling us there is a big need for this due to certain use cases, we will for sure re-evaluate the priority for this.
     
  16. Maras

    Maras

    Joined:
    Dec 11, 2012
    Posts:
    113
    So if someone would want to make a Unity 2D game with ECS it means using Tiny, right?
    That is pretty awesome. If that is the case, I can pretty confidently recommend focusing on Tiny in our company.
     
  17. atimurn

    atimurn

    Joined:
    Apr 22, 2013
    Posts:
    6
    Awesome update. Thanks.

    However I agree with @BanJaxe - it seems odd to have Entities 2d for pure implementation only. This limitation doesn't make sense, from game developer perspective at least (not engine developer).

    I can give you a real life example. Imagine match3 game and I'm not speaking about TinyGems with 2 buttons, lets say we have huge product with tons of UI/windows/popups, in other words "Meta game".
    So ECS is perfect for Match3 part. Lots of possibilities, performance and etc. (I really love it)
    But trust me, making such "Meta game" and supporting it in production (constant updates) will be nightmare using ECS. And quality of developers (I mean salary) will be much higher unreasonably. It is much simpler (yes simpler, not more familiar) to keep UI stuff in OOP with some MV* pattern (and SOLID in mind). You don't need all this 'performance by default' stuff in "Meta game".

    Don't get me wrong Tiny is a great feature. But I'm pretty sure you need hybrid for 2d games with more than 5 windows.
     
    GliderGuy likes this.
  18. elliotc-unity

    elliotc-unity

    Unity Technologies

    Joined:
    Nov 5, 2015
    Posts:
    54
    FWIW, while it does depend on tiny and that's what we're focusing on, we are not particularly intending to put up any roadblocks for building with hybrid. We need it to work in hybrid anyway for the time being in order for play mode to work. And indeed, hybrid does have many features tiny lacks today, like UI.

    But on the other hand, we do believe dots runtime as a framework can scale in every dimension very well, and in the long term we believe it will actually scale better than hybrid. I'd hope that we can even make a UI situation that you would prefer to the current hybrid one, but we'll leave that for you to judge when we ship it. :)
     
  19. JonasMumm

    JonasMumm

    Joined:
    Feb 22, 2019
    Posts:
    23
    Thank you for the update :)
    I've been toying around a bit, and it seems 2D- and 3D-Rendering at the same time are not compatible with each other? I placed a Sprite in the Tiny3D sample scene, and got it to display correctly, but as a result also all 3D content disappeared from the GameView. Is this the expected behaviour going forward?
     
  20. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    214
    Thank you for the heads up. Right now we do not have support for mixed 2d and 3d rendering. This is something we will look into in the future.
     
    JonasMumm likes this.
  21. Djayp

    Djayp

    Joined:
    Feb 16, 2015
    Posts:
    100
    I can copy/paste but could you, at least, separate the 2D Physics package (which is not Tiny nor 2D Rendering dependant) ?
     
  22. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    214
    Even though the 2d rendering part and the 2d physics part is in the same package, your tiny builds only need to include the assemblies you need. If you do not require any 2d rendering features, you can remove those assemblies from your build asmdef. You are correct in that 2D Physics does not depend on 2D Rendering, so that is a totally viable thing to do.
     
    Djayp likes this.
  23. Djayp

    Djayp

    Joined:
    Feb 16, 2015
    Posts:
    100
    It is the othe way around, I'm using it outside of project Tiny, so I'd like to be able to update it via the package manager i/o extracting it from 2D Entities. Thank you for your work !
     
  24. ajaykumarkaranam188

    ajaykumarkaranam188

    Joined:
    Dec 26, 2019
    Posts:
    12
    When i am running the project TinySpaceShip , i am getting "Display 1 No cameras rendering " on the Game window.
    where i am doing wrong?
     
  25. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    3,128
    Sounds like the "Known Issues" post above:
     
  26. pavank_unity

    pavank_unity

    Joined:
    Nov 25, 2019
    Posts:
    2
    Not able to make a build following the document provided. After reading Chris reply i tried adding Unity.Tiny.EntryPoint to assemble reference and the build was successful but i could not run.
     

    Attached Files:

  27. ajaykumarkaranam188

    ajaykumarkaranam188

    Joined:
    Dec 26, 2019
    Posts:
    12
    created new subscene and added it to the Hierarchy and removed previous sub scenes in TinySpaceShip. now when i am trying to build web-wasm i am getting following error.

    Build Web-Wasm failed in BuildStepExportEntities after 78ms.
    SceneManager.SetActiveScene failed; invalid scene

    am i missing something?
     
  28. elliotc-unity

    elliotc-unity

    Unity Technologies

    Joined:
    Nov 5, 2015
    Posts:
    54
    @pavank_unity Right now we recommend just modifying our provided samples rather than creating a new project, as there are too many pitfalls in creating a new project. We are working on fixing that.

    If modifying samples can't work for you, could you paste the error you find when you try to run?
     
  29. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    214
    ajaykumarkaranam188 likes this.
  30. pavank_unity

    pavank_unity

    Joined:
    Nov 25, 2019
    Posts:
    2
  31. JonasMumm

    JonasMumm

    Joined:
    Feb 22, 2019
    Posts:
    23
    My Projects builds fine on Android and the web targets, but I can't get it to compile on Mac nor Windows. I'm always getting the following error (depending on build-target ofc):

    tundra: error: unable to map Mac-DotNet to any named node or input/output file
    Warning: UseBurst specified, but target does not support burst yet. Not using burst.
    Warning: UseBurst specified, but target does not support burst yet. Not using burst.
    [ 5s] Executed build program. Created build graph with 1558 nodes.
    [ 5s] Build frontend of artifacts/tundra_Mac-DotNet_047.dag ran (build file timestamp changed: ../../../../../../../Library/Frameworks/Mono.Framework/Versions/Current)

    This error comes up in all the sample projects as well, so I'm guessing it may have something to do with the mac I'm using. macOS Catalina 10.15.3 with Visual Studio Community 2019 for Mac installed, Unity 2019.3.4f1 with Windows and Mac Build modules.
     
    Last edited: Mar 12, 2020
  32. elliotc-unity

    elliotc-unity

    Unity Technologies

    Joined:
    Nov 5, 2015
    Posts:
    54
    Do you have the tiny-required toolchains to compile for mac and/or windows? Windows requires VS C++ and .NET desktop workload, and Mac requires Xcode command line tools IIRC.

    (We obviously need to make that error message better.)
     
    JonasMumm likes this.
  33. Djayp

    Djayp

    Joined:
    Feb 16, 2015
    Posts:
    100
    Hello ! Still playing with 2D Physics, I see there is (IgnoreHit)OverlapColliderInput.Ignore. IgnoreHit only takes one ignoreBodyIndex. Can we ignore multiple bodies ?
     
  34. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    3,128
    No but you can do that with your own "ICollector" on the output side. The downside there being that this is done after the narrowphase so is far less efficient.

    I was considering this ability so we can filter at the broadphase level. We could certainly extend the IgnoreHit API to include an optional NativeList of bodies for instance. By far the fastest way though is obviously via a CollisionFilter.

    If you have any suggestions on how you'd like to present that list of bodies to ignore then, I'm happy to listen. It would seem improving the IgnoreHit to simply allow this might be the easiest approach.
     
    Last edited: Mar 12, 2020
    Djayp likes this.
  35. Djayp

    Djayp

    Joined:
    Feb 16, 2015
    Posts:
    100
    Code (CSharp):
    1. struct CollisionJob : IJobForEachWithEntity<Projectile, PhysicsColliderBlob, Translation, Rotation>
    2.     {
    3.         public PhysicsWorld physicsWorld;
    4.  
    5.         [ReadOnly] public ComponentDataFromEntity<Projectile> entitiesProjectileMap;
    6.         [ReadOnly] public ComponentDataFromEntity<Translation> entitiesTranslationMap;
    7.         [WriteOnly] NativeHashSet<EntityPair >.ParallelWriter collisionCache;
    8. // Some stuff here...
    9.  
    10.         public void Execute(
    11.             Entity entity,
    12.             int index,
    13.             [ReadOnly] ref Projectile projectile,
    14.             [ReadOnly] ref PhysicsColliderBlob collider,
    15.             [ReadOnly] ref Translation translation,
    16.             [ReadOnly] ref Rotation rotation)
    17.         {
    18.             float3 projectilePosition = translation.Value;
    19.             NativeList<OverlapColliderHit> hits = new NativeList<OverlapColliderHit>(16, Allocator.Temp);
    20.             if (physicsWorld.OverlapCollider(
    21.                     new OverlapColliderInput
    22.                     {
    23.                         Collider = collider.Collider,
    24.                         Transform = new PhysicsTransform(projectilePosition, rotation.Value),
    25.                         Filter = collider.Collider.Value.Filter,
    26.                     },
    27.                     ref hits))
    28.             {
    29. // Some stuff here...
    30.  
    31.                 for (int i = 0; i != hits.Length; i++)
    32.                 {
    33.                     OverlapColliderHit hit = hits[i];
    34.                     Entity otherEntity = hit.Entity;
    35.  
    36.                     if (collisionCache.TryAdd(new EntityPair (entity, otherEntity)))
    37.                     {
    38.                         Projectile otherProjectile = entitiesProjectileMap[otherEntity];
    39.                         float3 projectilePosition2 = entitiesTranslationMap[otherEntity].Value;
    40. // ...
    41.  
    Code (CSharp):
    1. public struct EntityPair : IEquatable<EntityPair>
    2. {
    3.     public Entity Value1;
    4.     public Entity Value2;
    5.     public EntityPair(Entity value1, Entity value2)
    6.     {
    7.         Value1 = value1;
    8.         Value2 = value2;
    9.     }
    10.     bool IEquatable<EntityPair>.Equals(EntityPair other)
    11.     {
    12.         return (Value1.Equals(other.Value1) && Value2.Equals(other.Value2)) || (Value1.Equals(other.Value2) && Value2.Equals(other.Value1));
    13.     }
    14. }
    15.  

    Right now I'm checking if the calculation has already been done for the pair of entities (l.36). I don't know how I could generate a NativeList for each entity from the job. I thought about buffers too, but I'd need to write on the buffer of another Entity so this job could only be single threaded...
     
    Last edited: Mar 13, 2020
  36. JonasMumm

    JonasMumm

    Joined:
    Feb 22, 2019
    Posts:
    23
    That was it, I was missing Xcode indeed. Thank you for the help :)
     
  37. ajaykumarkaranam188

    ajaykumarkaranam188

    Joined:
    Dec 26, 2019
    Posts:
    12
    Created two 2d game objects added boxcollider2D and rigidbody2D 's to them and one of them i made it as kinematic. Physics are working fine but when i create a sub scene out of two objects. The physics are not working, one object is passing through other object.
    where it is going wrong?
    Thank you
     
    Last edited: Mar 16, 2020
  38. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    3,128
    What do you mean by "working fine" and do you mean the DOTS physics or classic physics?

    As the release states, there's no contacts reported or solved in this release so you won't get collision response.
     
    ajaykumarkaranam188 likes this.
  39. ktorz

    ktorz

    Joined:
    Jul 14, 2017
    Posts:
    1
    When I try to use Entities 2d with the unity netcode package it starts giving version reference error for some other packages.
    Is there some incompatibility with these two packages ?
     
  40. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    214
    Hello @ktorz ,
    Currently Unity NetCode does not support Project Tiny.
     
  41. ajaykumarkaranam188

    ajaykumarkaranam188

    Joined:
    Dec 26, 2019
    Posts:
    12
    classic physics i guess.

    And even the Ui components in the subscene are not rendering.

    Created a canvas inside the subscene. Inside canvas added two image components.they are rendering fine when i am in subscene but when i come to main scene ,not even a single ui image is rendering.
     
    Last edited: Mar 16, 2020
  42. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    214
    ajaykumarkaranam188 likes this.
  43. ajaykumarkaranam188

    ajaykumarkaranam188

    Joined:
    Dec 26, 2019
    Posts:
    12
    classic physics.
    if i play the subscene the two objects are colliding with each other.but when i play from main scene the objects are passing through each other.

    so are you saying physics is not supported in this version?

    Thank you for the quick response.
     
  44. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    3,128
    Yes, you already described that and I fully understand so I can only reiterate what I said which is that there's no collision response. Collision response is what stops colliders from being overlapped. Sounds like by "physics" you are referring to this.

    Hope that helps.
     
    ajaykumarkaranam188 likes this.
  45. Uli_Dantas

    Uli_Dantas

    Joined:
    Aug 21, 2014
    Posts:
    5
    Hi Ted! I was waiting for some news on the Tiny Roadmap now on GDC, but with the COVID-19 cancellation i will ask here:
    What are the next "big" features we should expect in Tiny? Any idea of when there might be the first round of UI features?
    Thanks
     
    VitDev likes this.
  46. JC-Cimetiere

    JC-Cimetiere

    Unity Technologies

    Joined:
    May 8, 2014
    Posts:
    118
    Hi,
    We are working on UI, we know it's a super important feature. Timing for when we can share details is still uncertain. Overall we will continue to provide updates as much as possible when we publish a new preview. We understand it's frustrating not knowing, however we want to be careful and only share when timelines are super solid, so you can plan accordingly.
    Keep sharing feedback on features you need the most. Also keep in mind what was shared last September at Unite Copenhagen 2019 during roadmap of Project Tiny (session recording and quick summary), the high level goals are the same.
    JC
     
    GliderGuy, Maras and VitDev like this.
  47. Shredder25

    Shredder25

    Joined:
    Jun 25, 2016
    Posts:
    11
    So I have been playing around with this new package. Since collision is not there Yet I wrote my own basic one, not perfect but works. I was also able to write a simple animation system witch is working great! Really only lacking UI right now.

    Right now I have a build where you can move a character around a room with 4 chests and open them up (just playing an open animation no UI or anything)

    Some notes:
    * Been running into crashes when editing positions of things (seems like when there are many child objects but have not tested enough to be sure). Workaround right now is if I need to change the position I remove it from the subscene edit and put it back in.
    * Physics movement seems to be a little jerky in the editor but smooth when building
    * I see a layer component on the entities but It doesn't seem to take the value from the sprite renderer. causing some sprites to sometimes show behind others and sometimes not. I have only built the game a few times but this doesn't seem to be an issue during an actual build and only in the editor.
    * Physics.CastCollider seems to be picking up the collider that is casting. I am using the filter from the collider. Physics CastRay does not however. For the time being I am using the overload with a NativeList ref argument and filtering out the entity
    * GenerateAuthoringComponent throws an error, not a big deal since i tend to use IConvertGameObjectToEntity anyways

    Overall: I am really happy with the direction of 2d entities. Excited to see it show up in the package manager
     
  48. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    214
    Hey @Shredder25 ,
    Thank you for your feedback!

    We have discovered an issue where GenerateAuthoringComponent would crash the editor in certain situations. In the next version, we have fixed this issue.
    If you only use IConvertGameObjectToEntity, does the crashing issue go away?

    If you close your subscene, is the jerky-ness still there in editor playmode?

    Are you referring to the SortLayer component which is attached to the same Entity which has the SpriteRenderer component?

    In the editor, we are rendering using different data sources depending on the view (Scene View & Game View) and whether or not the subscene is open (Edit mode) or closed.
    - If the subscene is open (Edit mode), the Game View will render with data converted over into the ECS world. The Scene View will render with data from the actual Game Objects.
    - If the subscene is closed, both the Scene View and Game View will render with data converted over into the ECS world.
    This is not an ideal setup, and we are looking into ways we can improve this workflow.

    Could you share some code on how you implemented this?

    What error are you seeing? and when does it throw this error?

    Thanks again for your feedback, this is really helpful for us!
     
  49. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    3,128
    CastCollider can use a collider you explicitly create (that won't be in the broadphase) but if you're referencing an existing collider that is in the broadphase (world) then it has no way to know you want to ignore the body it's attached to. But, as you say, if you're sure your CollisionFilter for that collider is set so it doesn't intersect with the layer its on then it won't or shouldn't detect it so I'm not sure what's going on there. Note that all queries provide an IgnoreHit but I'm not sure how you're referring to the collider but if you know the body index it's attached to you can use this to explicitly tell it to ignore it.
     
  50. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    3,128
    Any "jerky" motion would be caused by the update rate of the component systems. Are you sure this is limited to physics though? I find that "Menu > Jobs > Leak Detection" set to anything other than "Off" causes this because of its overhead. Also, it takes a little while for Burst to do its job so you'll initially get jerky/stuttering when hitting play too. None of this exists in a build.

    EDIT: Feel free to DM me or create another thread and send me the link if you want to work out physics issues. It's better than doing everything here. Happy to help.
     
Thread Status:
Not open for further replies.
unityunity