Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  3. 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 Project Tiny Fall update “Tiny Racing" preview.3 - 020.0 is available

Discussion in 'Project Tiny' started by JC-Cimetiere, Dec 12, 2019.

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

    AbdulAlgharbi

    Unity Technologies

    Joined:
    Jul 27, 2018
    Posts:
    130
    correct, the canvas is now 100x100
    but the rendering is done at 1080p internal resolution and then scaled up/down to the target display.
    It will be made configurable and more flexible in a future release.
     
    Thaina likes this.
  2. biscito

    biscito

    Joined:
    Apr 3, 2013
    Posts:
    90
    works great ! how do you just make it full screen ? no black bar,
     
  3. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    407
    Thank you. But then, are there any code snippet that let us control internal resolution for current version in the meantime ?
     
  4. yossi_horowitz_artie

    yossi_horowitz_artie

    Joined:
    Jan 30, 2019
    Posts:
    87
    So at build time, classical Unity's `MeshRenderer` and `MeshFilter` get converted to Tiny's ECS mesh rendering equivalents, and `AudioSource` gets converted to Tiny's ECS audio playback equivalent.

    There's seemingly no support for animation yet, but when it eventually comes, what's the plan for having animation that works both in the editor and in Tiny builds? Will it be based on the upcoming DOTS animation system?
     
  5. AbdulAlgharbi

    AbdulAlgharbi

    Unity Technologies

    Joined:
    Jul 27, 2018
    Posts:
    130
    Right now it's not easy to change the default rendering internal resolution. we are planning to expose that option in future versions and make it more user-friendly.
     
    biscito likes this.
  6. Greenfendr

    Greenfendr

    Joined:
    Dec 6, 2018
    Posts:
    1
    Is there a current roadmap? Would love to use this on an upcoming project if it's ready by the time we're kicking off.
     
  7. AbdulAlgharbi

    AbdulAlgharbi

    Unity Technologies

    Joined:
    Jul 27, 2018
    Posts:
    130
    You need to add `js~` directory in your project and put your js files inside it. they will get compiled as jslib when you build for web targets.
    then you can use `[DllImport("__Internal")]` to call the js functions from the c# code
    just like https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html
     
    tonialatalo likes this.
  8. AbdulAlgharbi

    AbdulAlgharbi

    Unity Technologies

    Joined:
    Jul 27, 2018
    Posts:
    130
    So we are planning to do frequent updates to address bug fixes and add support for Unity.Physics and 2D. Also, there is a plan to share the project road map sometime in Q1 2020.
     
    Jalol and Maras like this.
  9. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    407
    That's sound great except we don't know when is the future of next release. So please tell me how can I do it in current release. Maybe just what property in which struct


    How about html? Could we put html in that folder and expect to be template for building?
     
    Last edited: Dec 18, 2019
  10. elliotc-unity

    elliotc-unity

    Unity Technologies

    Joined:
    Nov 5, 2015
    Posts:
    52
    Yes, it will be based on DOTS animation, exactly.
     
  11. elliotc-unity

    elliotc-unity

    Unity Technologies

    Joined:
    Nov 5, 2015
    Posts:
    52
    We have no great way to do this right now, but you can modify or replace
    com.unity.dots.runtime/bee~/shell.html
    for now, and be ready for it to be overwritten on package updates (or embed the package).
     
    Thaina likes this.
  12. sebastianm_unity

    sebastianm_unity

    Unity Technologies

    Joined:
    May 3, 2018
    Posts:
    19
    No, the internal resolution is hardcoded to 1080p for the tiny racing preview.
    The render graph building will get a public API and editor component soon that will let you choose what graph to build and at what resolution, including rendering directly to the back buffer or relative back buffer scale.

    If you are REALLY adventurous, you can change the auto render graph construction by editing RenderGraphBuilder.cs.
    For example changing the line eMainView = BuildDefaultRenderGraph(1920, 1080); will change the internal rendering resolution.
     
    Thaina likes this.
  13. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    407
    Thank you very much
     
  14. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    407
    Somehow work fine. Just couldn't change it dynamically, require reload when changing resolution

    upload_2019-12-19_13-54-56.png upload_2019-12-19_13-55-48.png

    upload_2019-12-19_13-56-31.png

    Also work in mobile



    upload_2019-12-19_14-8-13.png

    Code Snippet for
    ProjectTinySamples\Tiny3D\Library\PackageCache\com.unity.tiny.rendering@0.20.0-preview.3\Runtime\Unity.Tiny.Rendering.Native\RenderGraphBuilder.cs:489


    Code (CSharp):
    1.  
    2.             Entity eMainView = FindMainViewNode();
    3.             if (eMainView == Entity.Null)
    4.             {
    5.                 // we only build a default graph if there are no existing nodes - otherwise assume they are already built
    6.                 RenderDebug.Log("Auto building default render graph");
    7.                 var env = World.GetExistingSystem<Tiny.TinyEnvironment>();
    8.                 var di = env.GetConfigData<Tiny.DisplayInfo>();
    9.                 eMainView = BuildDefaultRenderGraph(di.width,di.height);
    10.                 Entities.ForEach((ref Camera c) => c.aspect = di.width / (float)di.height);
    11.             }
    12.  
     
    Last edited: Dec 20, 2019
    Silenius_ and De-Panther like this.
  15. portaplay

    portaplay

    Joined:
    May 17, 2013
    Posts:
    10
    Loads very fast and renders fine on iphone x (chrome).
    But not fullscreen. And buttons are offset and offscreen (can only turn right, not left)
     
  16. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    144
    Great work so far guys. This is really exciting. We spun up a little live logo on our site to test this out.
    It's embwedded here: http://frameinteractive.com
    Source is here: http://frameinteractive.com/tiny

    It works well except we can't get rid of the black bars on the sides in the embedded version. We understand you fixed render aspect to 1920x1080 and so our assumption is that the black is whatever falls outside of the camera, but is there some way to set that black color to something different (even if we have to edit source for now).

    Thanks
     
  17. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    407
    See my comment in the meantime

    https://forum.unity.com/threads/pro...020-0-is-available.792999/page-2#post-5297742
     
  18. sebastianm_unity

    sebastianm_unity

    Unity Technologies

    Joined:
    May 3, 2018
    Posts:
    19
    It's not configurable with a public API at the moment (we will add one!) You can for now change it manually in RenderGraphBuilder.cs, around line 80:

    Code (CSharp):
    1.  
    2.             Entity ePassBlit = EntityManager.CreateEntity();
    3.             EntityManager.AddComponentData(ePassBlit, new RenderPass
    4.             {
    5.                 inNode = eNode,
    6.                 sorting = RenderPassSort.Unsorted,
    7.                 projectionTransform = float4x4.identity,
    8.                 viewTransform = float4x4.identity,
    9.                 passType = RenderPassType.FullscreenQuad,
    10.                 viewId = 0xffff,
    11.                 scissor = new RenderPassRect(),
    12.                 viewport = new RenderPassRect { x = 0, y = 0, w = (ushort)w, h = (ushort)h },
    13.                 clearFlags = RenderPassClear.Color,
    14.                 clearRGBA = 0, // change me!
    15.                 clearDepth = 1.0f,
    16.                 clearStencil = 0
    17.             });
    18.  
    This might have some platform issues though, it's the direct backbuffer clear color which will be srgb or not depending on the target.
     
  19. BirdInTheCity

    BirdInTheCity

    Joined:
    Jun 9, 2017
    Posts:
    8
    This is game-changing! (Please excuse the pun.) NICE WORK!

    Can't wait to dive in. So, we can expect WebAR implemented by New Year's, right? :p
     
    elliotc-unity likes this.
  20. De-Panther

    De-Panther

    Joined:
    Dec 27, 2009
    Posts:
    361
    In Unity WebGL there's also the use of ".jspre" files, which are JS files that load before the wasm is loaded. Any way to add those?

    Thanks
     
  21. elliotc-unity

    elliotc-unity

    Unity Technologies

    Joined:
    Nov 5, 2015
    Posts:
    52
    Create a
    prejs~
    directory next to your game's asmdef, and put your .js files you want to load beforehand in there.
     
    tonialatalo, De-Panther and Thaina like this.
  22. De-Panther

    De-Panther

    Joined:
    Dec 27, 2009
    Posts:
    361
    Thanks.
    Do we still have the option to also compile .c/.cpp and .h files like in the Unity WebGL build?
     
  23. HonorableDaniel

    HonorableDaniel

    Joined:
    Feb 28, 2007
    Posts:
    2,965
    I'm getting 10 errors when I attempt to make a Mac build, and they are stopping the build from happening. Here are 3 of them:

    Library/PackageCache/com.unity.dots.runtime@0.1.0-preview.5/TypeRegGen/TypeRegGen.cs(141,64): error CS0246: The type or namespace name 'JsonTextWriter' could not be found (are you missing a using directive or an assembly reference?)

    Library/PackageCache/com.unity.dots.runtime@0.1.0-preview.5/TypeRegGen/TypeRegGen.cs(135,58): error CS0246: The type or namespace name 'JsonTextWriter' could not be found (are you missing a using directive or an assembly reference?)

    Library/PackageCache/com.unity.dots.runtime@0.1.0-preview.5/TypeRegGen/TypeRegGen.cs(129,59): error CS0246: The type or namespace name 'JsonTextWriter' could not be found (are you missing a using directive or an assembly reference?)

    EDIT: I fixed the issue by building via a BuildSettings file instead of File -> Build Settings.
     
    Last edited: Dec 21, 2019
  24. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    407
    Operator '*' cannot be applied to operands of type 'quaternion' and 'float3'


    Feel weird that `Unity.Mathematics` are not implemented math operator in common type
     
    Last edited: Dec 21, 2019
  25. biscito

    biscito

    Joined:
    Apr 3, 2013
    Posts:
    90
    edit :
    Current preview doesn’t include any features in the following areas: 2D, UI,
    Physics, Networking, Animation.

    Will it work later with cinemachine in the next preview ?
     
    Last edited: Dec 22, 2019
  26. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,029
    math.mul implements that
     
  27. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    407
    @eizenhorn Actually it need `math.rotate` and that's what I said it feel weird that everything moved into `math` class
     
  28. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    144
    This does work! And you're right, the srgb conversion is an issue. We had to eyeball the color to get it to match a browser background color, and it is different on Chrome vs Safari on Mac.

    Still, better than nothing

    Side note, is there a better way to clear these .wasm builds from the browser cache than to nuke the entire cache? It doesn't seem to be site based.
     
  29. elliotc-unity

    elliotc-unity

    Unity Technologies

    Joined:
    Nov 5, 2015
    Posts:
    52
    I personally know that 2D and physics are coming super soon; I believe some amount animation soonish; UI/networking/cinemachine, I don't have as concrete info about the timeline, but I know people are looking into them.
    Are you comparing to big unity's
    Mathf
    functions? That's because we're using Unity.Mathematics, which is a package, whereas Mathf is part of big unity, which is not available in tiny. Burst is also especially good at generating code for Unity.Mathematics, if that helps. I think the naming of Unity.Mathematics was designed to be like HLSL.

    FWIW, I would recommend the combination of Unity.Mathematics + Burst for all new math code in both big and small unity.
    Put your cpp files in a cpp~ directory next to the asmdef.
    Yes, File->Build Settings will try to create a big unity build, which will not work (and is presumably not what you want, either). I will look into ways of making this less confusing in the future.
     
    bartkoko, tonialatalo and De-Panther like this.
  30. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    407
    Nope, I mean `quaternion * float3` operator. I think putting everything in `math` class is not very practical. It too big to find anything useful. At least function like `rotate` should be putted in `quaternion` directly
     
  31. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,029
    Actuly it's the same as math.mul, vector rotation it's multiplication quaternion to vector.
    Code (CSharp):
    1. /// <summary>Returns the result of transforming a vector by a quaternion.</summary>
    2.         [MethodImpl(MethodImplOptions.AggressiveInlining)]
    3.         public static float3 mul(quaternion q, float3 v)
    4.         {
    5.             float3 t = 2 * cross(q.value.xyz, v);
    6.             return v + q.value.w * t + cross(q.value.xyz, t);
    7.         }
    Code (CSharp):
    1. /// <summary>Returns the result of rotating a vector by a unit quaternion.</summary>
    2.         [MethodImpl(MethodImplOptions.AggressiveInlining)]
    3.         public static float3 rotate(quaternion q, float3 v)
    4.         {
    5.             float3 t = 2 * cross(q.value.xyz, v);
    6.             return v + q.value.w * t + cross(q.value.xyz, t);
    7.         }
     
    Thaina and GliderGuy like this.
  32. wechat_os_Qy04mety7DVrpoaP2EVm5y4vg

    wechat_os_Qy04mety7DVrpoaP2EVm5y4vg

    Joined:
    Dec 12, 2019
    Posts:
    2
    Build Wasm failed in BuildStepRunBee upload_2019-12-25_12-0-40.png help!!!
     
  33. AbdulAlgharbi

    AbdulAlgharbi

    Unity Technologies

    Joined:
    Jul 27, 2018
    Posts:
    130
    Can you share more information about the failure?
    You can find the full error message in the Console window
     
  34. wechat_os_Qy04mety7DVrpoaP2EVm5y4vg

    wechat_os_Qy04mety7DVrpoaP2EVm5y4vg

    Joined:
    Dec 12, 2019
    Posts:
    2
    upload_2019-12-25_14-14-17.png
     
  35. elliotc-unity

    elliotc-unity

    Unity Technologies

    Joined:
    Nov 5, 2015
    Posts:
    52
  36. Jiangxx

    Jiangxx

    Joined:
    Sep 20, 2018
    Posts:
    5
    Hi,We are using unity and js for web development. How to get unity to receive js data and unity to send js data.In addition,Can the ProjectTiny support Dotween?
     
  37. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    146
    For your first question, see this post: https://forum.unity.com/threads/pro...020-0-is-available.792999/page-2#post-5292603

    For your second question, DOTween is working with MonoBehaviours. Project Tiny does not support MonoBehaviour in builds.
     
  38. EdRowlett-Barbu

    EdRowlett-Barbu

    Joined:
    Mar 16, 2015
    Posts:
    88
    I'm getting the exact same exception mgear is getting, using Unity 2019.3.0f1 and building asmjs or wasm, same error with either, on chrome.
    On firefox, disabling strict origin policy like mgear mentioned worked fine.

    On chrome, I'm launching it with --allow-file-access-from-files locally
     
    Last edited: Dec 26, 2019
  39. Jiangxx

    Jiangxx

    Joined:
    Sep 20, 2018
    Posts:
    5
    Hi, I am try to build a asmjs release. but it have some thing rong, the project build in Windows-DotNet succeeded .
     

    Attached Files:

  40. elliotc-unity

    elliotc-unity

    Unity Technologies

    Joined:
    Nov 5, 2015
    Posts:
    52
    I've never seen this before, but my guess is that something may have been interrupted or corrupted, and that it might fix itself if you delete Library/DotsRuntimeBuild.
     
  41. Jiangxx

    Jiangxx

    Joined:
    Sep 20, 2018
    Posts:
    5
    Unfortunately, the same error occurred when I deleted it and rebuilt it
     
  42. elliotc-unity

    elliotc-unity

    Unity Technologies

    Joined:
    Nov 5, 2015
    Posts:
    52
    Fascinating. What if you delete
    %HOME%/AppData/Local/Stevedore/artifacts/emscripten
    ?
     
  43. Jiangxx

    Jiangxx

    Joined:
    Sep 20, 2018
    Posts:
    5
    There was no response when I deleted DotsRuntimeBuild, but when I rebuilt bee went back to redownload something, the error was the same
     
  44. elliotc-unity

    elliotc-unity

    Unity Technologies

    Joined:
    Nov 5, 2015
    Posts:
    52
    Oh dear. Zip up your DotsRuntimeBuild and send it over; in the meantime, I'd scan the installation instructions to see if you missed any.
     
  45. Jiangxx

    Jiangxx

    Joined:
    Sep 20, 2018
    Posts:
    5
    The file is too big. It has 500 M. How can I send it to you
     
  46. haitt92

    haitt92

    Joined:
    Dec 30, 2019
    Posts:
    1
    is there new version webgl build?
    when i open tiny game in mobile browser i dont see notification popup "unity webgl is not currently supported on mobiles". And loading speed faster than the old version.
    If that's true, then it's really wonderful.
     
  47. longkeng

    longkeng

    Joined:
    Sep 2, 2014
    Posts:
    18
    I have built the Tiny Racing game successfully as Wasm and Asmjs.

    Next, I want to upload these outputs to Facebook as Playable Ad but in the JS and .wasm file contain the XMLHttpRequest object while Facebook does not allow use it.

    https://developers.facebook.com/docs/app-ads/formats/playable-ad#zip



    Does Tiny package support to build the Facebook Playable Ad?
     
  48. lulier

    lulier

    Joined:
    May 22, 2015
    Posts:
    7
    hi, great work. Everything works fine until i try to change the shader and build as wasm. i just can not make my modification takes effect. i wander what should i do to make my changes take effect, can anyone help me ?
     
  49. scranley

    scranley

    Joined:
    Dec 1, 2013
    Posts:
    8
    is it possible to do drag and drop?
     
  50. Hohoyapogy

    Hohoyapogy

    Joined:
    Feb 14, 2016
    Posts:
    3
    Hello did dots visual scripting will support tiny project in the near future?
    Thanks^^
     
Thread Status:
Not open for further replies.
unityunity