Search Unity

Question Why can't I edit the components of an imported object

Discussion in 'Editor & General Support' started by SprayNpraY, May 30, 2023.

  1. SprayNpraY

    SprayNpraY

    Joined:
    Oct 2, 2014
    Posts:
    156
    Hi I can't find an answer to the following.

    upload_2023-5-30_21-30-27.png
    In an imported asset I've got following a udemy course, a road prefab that is also a model as shown in the screenshot above, does not allow me to change any of its components or even its layer and tag:
    upload_2023-5-30_21-31-25.png
    This screenshot is on the same "object" even though it has settings for a model above it and says imported object beneath and then appears like a normal gameobject which I've never seen before.

    Why is this happening and is there any work around?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,697
    You're editing the imported model.

    Make a prefab out of it and you can do all those other things with it.

    If any of that even REMOTELY sounds confusing or unclear, set your project aside and spend a few hours with basic Unity tutorials because you are going to be lost without understanding the critical distinction between an Asset you import and a Scene or Prefab you make.
     
    SprayNpraY likes this.
  3. SprayNpraY

    SprayNpraY

    Joined:
    Oct 2, 2014
    Posts:
    156
    Thank you for a helpful response as always, I probably haven't posted anything here in almost a year yet you were always the first to help.

    Anyway... I've followed quite a few unity-specific and C# courses in the past yet I've never seen anything that covers how working with an asset like this works (even though I've used many assets in the past) nor can I find any tutorials on it. It may be extremely basic but I can't find anything on it.

    Just to be clear I know how prefabs, prefab variants etc work.

    The most helpful thing I have found is:
    https://answers.unity.com/questions/12672/asset-vs-prefab-vs-unity3d-.html
    Everything else comes up with how to work with prefabs or get something from the asset store which I already know how to do.

    I understand what an asset is such as an imported model, what prefabs are but the model itself is already a prefab, I've just made a new original prefab from the assets prefab or whatever it is which has allowed me to edit it how I want.

    So I'm guessing assets can be imported as prefabs but then I have to make a new original prefab from it in order to change its scaling and other gameobject values etc?
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,697
    This is a bit of a gray area. A multi-GameObject model dragged into a scene will trigger "break prefab" complaints in the same ways as a prefab when you start moving stuff around.

    Think of it is a cascades of things:

    Asset -> scene

    Asset -> prefab -> scene

    Asset -> base prefab -> variant prefab -> scene

    Subsequent things may overwrite previous things.
     
    SprayNpraY likes this.
  5. SprayNpraY

    SprayNpraY

    Joined:
    Oct 2, 2014
    Posts:
    156
    For anyone who comes across this with the same question, I asked skynet lite I mean GPT about this through many questions this is the conclusion I came to.

    It's an imported model which depending on how the creator and software used created the model with its settings etc unity basically decides how it should be treated such as if it has scale settings etc so it adds a transform.

    However unlike an actual gameobject or prefab none of its values can be edited within unity, unity is just adding required components so it can be used within unity itself.

    So it isn't a prefab even though it has blue writing when put into a scene, unity does this for both prefabs and models.

    In order to use the model in a prefab if it has prefab like properties, you need to drag it into the scene and unpack the prefab completely, you can then treat it like a normal gameobject with the added model, materials etc and turn it into a prefab.
     
    xalexmd9x likes this.