Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Files with differing names and multiple Unity types

Discussion in '2022.2 Beta' started by vertxxyz, Nov 23, 2022.

  1. vertxxyz


    Oct 29, 2014
    It seems you can now create UnityEngine.Object subtypes in files that don't share the same name without that causing errors.
    Presumably this is intended, and linked to:
    Long time coming and should help reduce friction for beginners a ton!

    You can also have multiple unity types in the same file. Presumably the one that isn't matched is described as 'not templated' as per that patch note. That type can only be used via
    , and won't appear in any menus, even with you add the
    Should that be considered a bug? I have zero familiarity with what's expected in this whole new world.

    I imagine it's not allowed as the Add Component UI has logic that makes assumptions about scripts being capable of having the editor-assigned references. But there's no good indicators that this is a restriction. I would instead expect that logic to be ignored, and the UI to function as normal.
    Last edited: Nov 23, 2022