So, I’ve made the decision to convert my 3d game to 2d and I was quite… far along in my 3d version…
Problem is, a lot of the systems are using scriptable objects and instead of attempting to find all of the settings that needed to be changed from a basic (3d) project, and having just recently upgrading unity to find an actual (2d) mobile build, I decided I was just going to bite the bullet and take the scripts and recreate the scene as it was just a prototype at the type.
Now, the issue with this is my assets that are based on scriptable objects all look like:
Is there a way to automagically reload these references as it’s going to take me well over an hour or two to go in and do this by hand? If not, that’s fine - I knew what I was getting myself into. If there is, however, that would be amazing. Honestly, I tend to be more C# oriented and things like this I’ve spent little time on so I’m hoping someone out there has experience with things like project and .meta files.
Could you post the associated script?
A common reason for this to occur is when you change the name of the class or file without changing the other one too. Both class name and file name need to be identical including upper/lowercase. In this case the script in ColdDamageType.cs needs to be named “ColdDamageType”.
Unfortunately this is just because instead of doing through converting a 3d project to a 2d mobile project, as I’m am an ignoramus when it comes to things like render settings and the project settings that might effect 2d performance, I just opened a new unity project and dropped my script files in.
The script files names match.
[CreateAssetMenu(fileName = ScriptableObjectNames.ColdDamageType, menuName = AssetMenuNames.DamageType_MenuName + ScriptableObjectNames.ColdDamageType)]
public class ColdDamageType : ElementalDamageType
{
}
I was essentially hoping there was a way of forcing a reload of all the meta-files or something of that natures. Not only does this issue occur… when I go to select scriptable object assets that I know are there, they do not appear until I regenerate them. I’m just hoping I’ve got another option other than dropping all my .cs files into a new project and regenerating the .asset files for scriptable’s one at a time because they’re a large part of the combat system.
The damage types themselves essentially function as an enum at this point in case they need functionality so it’s basically a scriptable object with a name. This supports other types of systems like damage effects, status efffects, armor, resistances, and combat while allowing us to have essentially an unlimited range of damage types while not have to maintain two separate damage types based on physical or elemental.
Props to Fineman for his Unite talk:
I’m guessing you dropped them in without bringing over the meta files. Doing so would generate a new meta file, ergo, a new guid for the script, different to what the scriptable objects are looking for.
You can probably still salvage this by properly exporting the scripts as a package, and importing the scripts into your project - the correct way to transfer assets between projects.
There is no such conversion per se. It’s more about changing the camera viewport to (likely) orthographic projection and making the necessary changes to assets and scripts.
I’m with spiney199 here. Copy & paste Unity assets into a new project isn’t going to magically work. You’d have to export a .unitypackage for anything that you want to move over because that will let Unity include all the dependent assets required to make the asset work in any project.
It was my assumption that I did not simply want to change the projection to orthographic because the (2D) Mobile template had other functionality specific to the mobile platform such as (The Adaptive Performance Provider) as well as other settings I’m too ignorant to know about coming from a purely 3d background.
As to the package manager… Yeah, I probably should have just wrapped them up in package manager and transferred them. Again, the plan was the simply restart with just the C# scripts so that nothing from the the 3D project, settings-wise, was brought into the (2D) mobile template. But I appreciate the help. I know it was the wrong way to go about it, I just thought the leg work of researching the difference between the two templates would be less, as a function of time, than converting the (3D) project.
If you haven’t used your new scripts yet, you could potentially try and copy over the meta files now.
Basically copy each .cs file’s associated .meta file from the old project to the new one (overriding the existing ones).
That should make the scripts the same “assets” as far as Unity is concerned.
For context - the scriptable objects are associated with Script Assets, not the scripts themselves.
When you copied the CS files over, it generated new Script Assets from those files.
Oh, I’ve completely screwed myself. 
I’ve already begun changing them to use the 2D functions and removed vector3’s and those type of things, but I’ll give it a shot for the scriptable objects. Thanks for the help, truly. May save me some time!
Making a new project was a mistake. The entirety of your switch basically just needed to be installing a few packages and changing the camera settings
Could be. I had never used this version of unity before and did not have the option of a (2D) Mobile project prior to upgrading… which I did hoping the nav agent would be a little better… and then decided to go 2d and role out my own A* so that ended up being pointless. With the lack of documentation on the differences between the two, and what the package differences are, I didn’t want to take any chances of missing any. I’ve seen numerous posts in the past about folks being unable to find what default project settings needed to be changed (for things like URP for example) when migrating to mobile. I had not even seen the Adaptive Performance Provider until opening a (2D) Mobile template to be honest. My focus tends to be C# and I’m not exactly adept at the unity-side of the process.
Edit:
Is there a location or documentation somewhere that has a list of the different packages that I would need to remove and be required to add for making the conversion?