Code Monkey home page Code Monkey logo

Comments (2)

jeffcampbellmakesgames avatar jeffcampbellmakesgames commented on May 29, 2024

There is an option for something like this for fields where changing the name of a serialized field can result in a loss of the reference/value. In that example the attribute [FormerlySerializedAsAttribute] is available and can help preserve older references. See here for more information on usage.

The problem here though is that its not the reference itself that gets lost, its that the type itself changes when the class is renamed. Unity can't automatically convert from the old to the new type. This isn't likely something that can be solved this way. In general you're much better off settling on a name when first developing.

There are plugins and tools that can make it easier to find broken or missing references though. OdinInspector offers some limited scene validation using their [NonNull] attribute on serialized fields and a custom editor window which allows you to verify that a scene isn't missing any references. My AssetValidator tool here takes this up a notch by allowing you to run validators on your content for the before named functionality as well as a host of others. There are also some widely available menu item scripts that people have iterated on over the years like this that help you to find missing references and such without needing to use a dedicated plugin or tool.

from unity-atoms.

AdamRamberg avatar AdamRamberg commented on May 29, 2024

Closing issue due to not being relevant to Unity Atoms.

from unity-atoms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.