Installing or upgrading in Unity

Every time I upgrade I start getting compiler errors because the assets are not compatible. Are there any classes that can assist with understanding how to fix those? 

  • crew

    It depends what the errors are and whether or not they are errors or warnings. Warnings appear in yellow and won't really cause issues. If they appear red they are errors and can prevent you from playing the game. If you post what messages you're getting I can help you figure out how to resolve the issues. Note that this may be something you'll encounter from time to time when upgrading older projects as Unity does update specific APIs regarding scripting.

    • Forgive the spacing I couldn't make it single spaced.  I also have the same error for the "FPSCounter" and the "SimpleActivatorMenu".  Here is one of the errors and the script it is referring to:


      Error in Console:  Assets\RealisticTreeAndGrassPack\Realistic Grass and Bush Pack3\Standard Assets\Utility\ForcedReset.cs(5,26): error CS0619: 'GUITexture' is obsolete: 'GUITexture has been removed. Use UI.Image instead.


      Script:  

      using UnityEngine;

      using UnitySampleAssets.CrossPlatformInput;

      [RequireComponent(typeof(GUITexture))]

      public class ForcedReset : MonoBehavior {

           void Update () {

           // if we have forced a reset …

           if (CrossPlatformInputManager.GetButtonDown("ResetObject"))

           {

                 //...reload the scene

                 Application.LoadLevelAsync (Application.loadedLevelName);

                 }

            }

      }

      -----------------------------------------------------------------------------------------------------------------------------------




    • crew

      Unless you need that script the easiest solution would be to delete it. The error with that script is that it is using an outdated component "GUITexture" which is the older way of displaying images on the screen.

      If you're interested in knowing how I would fix this here are the steps:

      Remove the [RequireComponent(typeof(GUITexture))]

      Replace the Update method with this:

      public void RestartLevel ()
      {
       Application.LoadLevelAsync (Application.loadedLevelName); 
      
      }
      
      
      

      Create a UI Button (GameObject > UI > Button) 

      Utilize the "OnClick" event to call the public method "RestartLevel"



  • I am taking either the C# Bootcamp for Unity or the Game C# Programming Bootcamp.  Which one would you recommend?  I almost gave up on Unity simply because of the update issues.  Thank you so much! 

  • crew

    The Game Programming Bootcamp is the newer version and structured around specific areas of game dev better than the C# Bootcamp. The C# Bootcamp is a bit out dated but most of it still applies. The update issues can definitely be annoying especially when they're attached to projects Unity has built. I'm only aware of how to fix them as I've run into similar problems in the past.