ai_ana
ai_ana

Reputation: 3

How to fix the text area box in Unity inspector?

I recently updated unity from the 2018.3.2f1 version to the 2019.3.0a5 version. I decided to open up one of my games in the new version of unity. Everything seemed to be working as normal, but then I noticed that my the text area of my box had shrunk to the one line even though my code still showed that I had changed that with TextArea. This is something I need to fix fast because I'm working on a text game. Is there anyway to fix this or even to change my game to the old unity version?

I tried changing the size that I had TextArea on and changing the command to "Multiline" but it didn't do anything.

[CreateAssetMenu(menuName = "State")]
public class State : ScriptableObject
{
    [TextArea(14,10)] [SerializeField] string storyText;

    ...
}

Upvotes: 0

Views: 2452

Answers (2)

derHugo
derHugo

Reputation: 90659

2019.3.0a5 is an Alpha version (therefore the a).

It seems that they are introducing a completely new/different GUI layout and the [TextArea] attribute doesn't work currently.

There are two known issues related to that especialy the first one:

  • UI: Text input field does not resize in the inspector. (1156028)

but maybe also this one

  • Editor - Other: CustomPropertyDrawers have different behavior now in 2019.2 (1156837)

read more at What's new in Unity 2019.3.0 Alpha 5


In general: Avoid doing huge jumps in Unity versions .. especially jumping to alpha or beta versions ... as the name says they are basically for testing only

Safety first - try to upgrade incrementally, make tests and stop on the latest stable version like currently 2019.1.7! except you reaaally need a feature from the alpha and beta versions

Always make backups before migrating a project to a newer version. Start using VersionControl like e.g. Git so you can easily revert any changes made by the upgrade process.


Downgrading a Project to an older Unity version might work but most of the times also brings some trouble. During the upgrade Unity automatically makes some changes according to the change list of the newer version.

It sometimes doesn't work that smooth in the other direction since the older Unity version ofcourse has no information about what changes the later versions brought.

You can try and remove everything from your project folder except

  • The Assets folder
  • The ProjectSettings folder
  • The Packages folder (but make sure you read the Logs/Packages-Update.log) in order to find out if there where any changes made to the packages

You can ofcourse also simply delete the Packages folder and then later after opnening your project in the older version re-install all the packages you need via the PackageManager.

all other folders and files are generated by Unity automatically so you can remove them and Unity will restore them the next time you open the project.


The fastest way to cleanup your project is as said to use Git and have a .gitignore file like e.g. Github Unity .gitignore where you can also see which files can be deleted.

To set it up now install Git, open the Git Bash in your project folder and run

git init

then add a new file .gitignore with the content from the link and run

git add .gitignore

git commit -m "initial ommit"

then run

git add *

this will throw a warning for every ignored file but you can ignore that. Again run

git commit -m "Added current project state"

and then run

git clean -xfd

which automatically deletes any file that is listed as ignored in the .gitignore and also any untracked file (new files that are not version controlled - wheren't added by git add - so far).

Again ... before doing all of that you should make a Backup ;)

Upvotes: 1

If you want to go back to an earlier version, just delete the Library folder in your project, and open your project in the original version of Unity. That should work fine as long as there were no code changes made by you or the Unity code updater.

You may also need to edit the file ProjectSettings/ProjectVersion.txt with the version number you're reverting to.

You may also run into problems with the Unity Package Manager, as upgrading your project will likely also change the Packages/manifest.json file. If you can still open your project in the older version of Unity, you'll have to manually fix the versions of any used packages.

This is why Unity always warns you when you're opening an existing project in a newer Unity version, and why they don't support downgrading.

Upvotes: 0

Related Questions