Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Asset imported is scaled to 1

Discussion in 'General Discussion' started by aqeel25, Jan 4, 2021.

  1. aqeel25

    aqeel25

    Joined:
    Apr 8, 2019
    Posts:
    25
    I have imported an asset(FBX). That Asset and its child All are scaled to 1.Now I don't Know the size of anything as every object is scaled to 1. How will I know their sizes and how to resize them? Remember I want size not scale.
     
  2. MDADigital

    MDADigital

    Joined:
    Apr 18, 2020
    Posts:
    2,198

    They will keep their correct sizes (if the fbx was exported correctly) so 1 meter in blender is 1 meter in unity. Modular assets are made to snap to meters.
     
  3. aqeel25

    aqeel25

    Joined:
    Apr 8, 2019
    Posts:
    25
    How will I Know their sizes ? As all Childs and parents of my fbx have scale 1 in unity but actually they are of different sizes
     
  4. MDADigital

    MDADigital

    Joined:
    Apr 18, 2020
    Posts:
    2,198
    You can make a ruler with code or buy from asset store. But when building levels in unity its best done with modular assets that snap to the grid.

    Edit: I mean for buildings blocks like walls, doorways etc. Props usaly don't snap. But it's nice when larger props like tables etc snap.

    Example from the map im working on. The doorway snaps to meters as you can see


    upload_2021-1-4_11-27-21.png
     
    Last edited: Jan 4, 2021
  5. aqeel25

    aqeel25

    Joined:
    Apr 8, 2019
    Posts:
    25
    I have a mechanical machine and i am doing simulations on that . It is lathe machine. So i will try ruler
     
  6. MDADigital

    MDADigital

    Joined:
    Apr 18, 2020
    Posts:
    2,198
    If its bought from a asset store its a big risk its not true to scale. Our game is VR so the items you can interact with must be true to scale. I make sure of this in blender than export the rescaled version into Unity. Also make sure to have good pivot points.
     
  7. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,554
    For an object that has Renderer component attached, you can query Renderer.bounds:
    https://docs.unity3d.com/ScriptReference/Renderer-bounds.html

    This will give you an approximate axis-aligned box that encloses the object.

    In unity knowing precise object dimensions is kinda your job, however. And adjusting size means scaling object up/down.
     
  8. aqeel25

    aqeel25

    Joined:
    Apr 8, 2019
    Posts:
    25
    it is From Autocad
     
  9. MDADigital

    MDADigital

    Joined:
    Apr 18, 2020
    Posts:
    2,198
    Why not measure the objects there?

    Btw you can measure objects easy with parented gameobjects

    Vertex snap a empty gameobject to a side of the object you want to measure. Parent a gameobject to that object vertex snap that gameobject to a vertex on the other side of the object. Chec the parented objects position. Thats the distance (on the axis, if you need shortest path between points you need to create a script that does a distance check between the objects)
     
  10. aqeel25

    aqeel25

    Joined:
    Apr 8, 2019
    Posts:
    25
    I will try this