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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

[SOLVED] Standard assets gives too many errors in new versions

Discussion in 'Getting Started' started by BrewNCode, Jan 25, 2019.

  1. BrewNCode

    BrewNCode

    Joined:
    Feb 17, 2017
    Posts:
    372
    Hello, people who know all. I have a problem that is bugging me THE HELL UP. I have Unity 2018.2 And now in the new versions, I have to get the standard assets out from the Asset Store. Well, when I import the assets that I need (I imported Characters, Utility, and CrossPlatofrmInput assets) I got too many errors.

    Why is that That I need to restart the project to make those errors go away?
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    This is probably why they are working on a new standard assets package last I checked. Why you are getting the errors would depend on what exactly the errors are, which you haven't mentioned.

    In my experience you should never import the entire standard assets package, it is full of mostly stuff you won't use. Only import exactly what you need from it, which is often next to nothing.
     
    Homicide likes this.
  3. BrewNCode

    BrewNCode

    Joined:
    Feb 17, 2017
    Posts:
    372
    when you say to import just the necessary, you mean importing - for instance- Only the ThirdCharacterController prefab?
     
  4. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    If that is all you want out of it, yeah the prefab and any scripts it may need. Generally with the standard assets you're going to want to replace them with stuff you write yourself that fits better with your game anyways. Though they can be useful for prototyping or throwing together just something really quick.
     
    BrewNCode likes this.
  5. BrewNCode

    BrewNCode

    Joined:
    Feb 17, 2017
    Posts:
    372
    Thank you for the answer.
     
  6. BrewNCode

    BrewNCode

    Joined:
    Feb 17, 2017
    Posts:
    372
    UPDATE: I just found the perfect solution for this. I just downloaded the 2017 version. Problem solved.
     
    BKoculu, manueltimao and Joe-Censored like this.
  7. Taintedangel

    Taintedangel

    Joined:
    Feb 22, 2016
    Posts:
    4
    Welcome to unity!! I had this on 2017, 2018. I couldn't complete a project so I quit using it for now. Hopefully it will be fixed soon. I was getting errors in an empty scene. Cleared caches.. nothing worked. I'm bummed but hopefully they'll get it working soon cause I like unity.
     
  8. Mysterious_Soul123

    Mysterious_Soul123

    Joined:
    Jun 12, 2019
    Posts:
    1
    2019 same errors for me.
     
    BKoculu and rudra1217 like this.
  9. hypernaturalgames

    hypernaturalgames

    Joined:
    Dec 31, 2018
    Posts:
    2
    Package contains this description:

    "Package has been submitted using Unity 5.0.0, 5.1.4, 5.2.4, 5.3.1, 5.4.2, 5.5.0, 5.6.0, 2017.1.0, 2017.3.0, and 2017.3.1 to improve compatibility with the range of these versions of Unity"

    So I guess it would be wise to use it on a 2017.3 at most. I'm trying now on a 2019.1 and I'm having some issues with the Car AI control.
     
  10. unitybetawevoO

    unitybetawevoO

    Joined:
    Aug 23, 2019
    Posts:
    1
    same errors guys how to solve
     
  11. Ryan-Alexandre

    Ryan-Alexandre

    Joined:
    Dec 18, 2019
    Posts:
    1
    I installed the 32-bit version of unity, and when I install the standard assets, the scripts don't work, it says the script has errors, but they are factory what I do.
     
  12. unity_Wo5F3NBiP65jPA

    unity_Wo5F3NBiP65jPA

    Joined:
    May 26, 2019
    Posts:
    1
    Same problems here with Car package. Tried to fix by hand but it's simply a time waste.
     
  13. AndrewSeyderhelm

    AndrewSeyderhelm

    Joined:
    Mar 7, 2018
    Posts:
    2
    I am also getting errors with standard assets

    I just installed 2019.3 and added the standard assets. When I do that the game breaks and won't run due to compile errors. If I limit the install to ONLY the FPS controller is says it is missing items relating to head Bob etc. which causes even more errors. I have attached a screenshot of the errors.

    upload_2020-2-3_17-6-7.png
     
  14. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,217
    Unity's Standard Assets have been abandoned. We've been told that they're looking into replacing them but the last we heard of it was more than a year ago. Until then I recommend using them for learning purposes and building your own based off of that. To make them work you will need to use Unity 2018.
     
  15. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,178
    Also, a lot of assets have version specific packages. So if you ever upgrade, then import a package and it gives you errors, the first thing to do is to force it to download again in the asset manager, even if it doesn't say there is a new version out there.
     
  16. BrewNCode

    BrewNCode

    Joined:
    Feb 17, 2017
    Posts:
    372
    Yeah, if you want to use the Unity standard assets, you need to use Unity 2017 or older versions.
     
  17. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,217
    Just going to mention that I was able to import the Standard Assets into Unity 2019.3, and everything aside from the Car ran without any trouble. The Car required modifying a couple of scripts that were trying to create a GUIText. Removing all references to that completely fixed it.

    At a glance the majority of the warnings and errors (aka everything but the ones involving the Car) are entirely focused around the shaders in the pack. You can safely ignore all of them because long term you won't be using any of them.

    Edit: I've posted corrected scripts at the link below.

    https://forum.unity.com/threads/sta...now-what-you-think.516595/page-4#post-5458527
     
    Last edited: Feb 9, 2020
  18. ToadTWE

    ToadTWE

    Joined:
    Mar 22, 2020
    Posts:
    1
    I have a major problem. My error says Assets\Standard Assets\Utility\ForcedReset.cs error CS0619: 'GUITexture' is obsolete: 'GUITexture has been removed. Use UI.Image instead', and Assets\Standard Assets\Utility\SimpleActivatorMenu.cs(10,16): error CS0619: 'GUIText' is obsolete: 'GUIText has been removed, use UI.Image instead' I have no idea what this means. Please help me.
     
  19. Janawray

    Janawray

    Joined:
    Mar 18, 2020
    Posts:
    1
    I've had the same problem. Upon downloading assets, I received tons of error messages. Have you had luck in resolving these error messages?
     
    ahmetilhan282 likes this.
  20. Xonyne88

    Xonyne88

    Joined:
    Mar 27, 2020
    Posts:
    2
    This can be fixed very easy.
    I found this fix:

    1 . To fix the error in ForcedReset.cs all you've got to do is comment out line 6 (by adding "//" at the beginning of the line) This line was just there to force the gameobject to add a GUI Texture component which is no longer supported by Unity.

    2. To fix the error in SimpleActivatorMenu.cs right under line 2 where it says "using UnityEngine;" add "using UnityEngine.UI". Then in line 13 where it says "public GUIText camSwitchButton;" replace it with: "public Text camSwitchButton;"
     
  21. pixelgnosis

    pixelgnosis

    Joined:
    Mar 20, 2020
    Posts:
    1
    This worked for me. Thanks! I was able to enter game play mode after doing exactly what you stated in #2. I had managed to clear the first error simply by clicking "clear."
     
  22. Roc666

    Roc666

    Joined:
    Apr 14, 2020
    Posts:
    1
    Hi, Reading this thread, I thought it could help me fixing at least the first of these2 issues:
    1) Assets\Standard Assets\Utility\SimpleActivatorMenu.cs(11,16): error CS0246: The type or namespace name 'Text' could not be found (are you missing a using directive or an assembly reference?)
    2) For the FPS controller script: the associated script cannot be loaded. Please fix any compile errors and assign a valid script.
    I am a beginner, using standard assets, and Unity 2020.
    Any thoughts ?
    Thanks for your help
     
    JulianoMB likes this.
  23. manueltimao

    manueltimao

    Joined:
    Oct 20, 2017
    Posts:
    1
    Right one
     
  24. thomasforman

    thomasforman

    Joined:
    Apr 27, 2020
    Posts:
    5
    You have saved my sanity beyond what you will ever know. I've been on the brink of tears for the last 30 hours trying to figure this out. Thank you.
     
  25. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,658
    GregoryLane likes this.
  26. thuziel

    thuziel

    Joined:
    Feb 21, 2020
    Posts:
    2
    Thanks a lot! That really help! (Its not line 13 its line 12... not that it really matters ;)
     
  27. Sebastian2104

    Sebastian2104

    Joined:
    Jun 10, 2020
    Posts:
    1
    Please help me it says
    Assets/Standard Assets/Utility/SimpleActivatorMenu.cs(11,16): error CS0619: 'GUIText' is obsolete: 'GUIText has been removed. Use UI.Text instead.' and I really don't know what to do, please if anyone can help me I would be extremely grateful.
     
  28. Xonyne88

    Xonyne88

    Joined:
    Mar 27, 2020
    Posts:
    2
    Read what I said earlier
     
  29. paulbull

    paulbull

    Joined:
    Jul 3, 2020
    Posts:
    1
    I was able to do the same thing, but seeing that after 2 years people can't f**king dowload standard dependencies for the dev environment and not get errors that they need to comment out is pathetic. I wish I wasn't asked to look into unity for Web dev in the first place.
     
    duesentrieb66 and magicfm_01 like this.
  30. MaheshParihar1234

    MaheshParihar1234

    Joined:
    Sep 9, 2020
    Posts:
    1
    in unity 2019.4.9f1 standerd assets are not working properly,i import that and try to use the car but getting too many errors if anyone knows about that then please help.
     
  31. hsefak

    hsefak

    Joined:
    Oct 10, 2020
    Posts:
    1
    Thanks mate, solved it!
     
  32. DisguisedDEV

    DisguisedDEV

    Joined:
    Oct 11, 2020
    Posts:
    2
    Hi,
    I am jst getting into game dev and started my terrain details, As I was following a tutorial he said that we r going to use standard assets. I downloaded the assets and it gave alot of errors. He said to clear them but one error wouldn't clear and would not let me test my game progress. The error is :
    Assets\Standard Assets\Utility\SimpleActivatorMenu.cs(11,16): error CS0619: 'GUIText' is obsolete: 'GUIText has been removed. Use UI.Text instead.'
    I am using 2019.4.12f1
     
  33. joshanicholson

    joshanicholson

    Joined:
    Oct 14, 2020
    Posts:
    1
    Thank you, it worked so well!!!!!!!!!!
     
  34. ahmedaniss

    ahmedaniss

    Joined:
    Sep 18, 2019
    Posts:
    98
    problem fixed here :
     
    desig1814, Aymoon_10 and Yann like this.
  35. Rorlin

    Rorlin

    Joined:
    Dec 12, 2020
    Posts:
    1
    ahmedaniss, Thank you for the fix that worked great...
     
  36. msarkd

    msarkd

    Joined:
    Mar 17, 2020
    Posts:
    1
    YOU ARE A LEGENDD THANKS
     
  37. monkeyBarrel

    monkeyBarrel

    Joined:
    Mar 20, 2017
    Posts:
    2
    I only found one major issue with the Standard Assets Pack:

    Assets\Standard Assets\Utility\SimpleActivatorMenu.cs(11,16): error CS0619: 'GUIText' is obsolete: 'GUIText has been removed. Use UI.Text instead.'

    C# is not my strong suit but here is the code I changed to fix this error:

    using System;
    using UnityEngine;
    using UnityEngine.UI;


    #pragma warning disable 618

    namespace UI//UnityStandardAssets.Utility

    {

    public class Text //SimpleActivatorMenu : MonoBehaviour

    {

    public UI.Text camSwitchButton;

    public GameObject[] objects;

    private int m_CurrentActiveObject;

    private string text;


    private void OnEnable()

    {

    // active object starts from first in array

    m_CurrentActiveObject = 0;

    camSwitchButton.text = objects[m_CurrentActiveObject].name;

    }

    public void NextCamera()

    {

    int nextactiveobject = m_CurrentActiveObject + 1 >= objects.Length ? 0 : m_CurrentActiveObject + 1;


    for (int i = 0; i < objects.Length; i++)

    {

    objects.SetActive(i == nextactiveobject);

    }


    m_CurrentActiveObject = nextactiveobject;

    camSwitchButton.text = objects[m_CurrentActiveObject].name;

    }

    }

    }
     
  38. UNwon

    UNwon

    Joined:
    May 28, 2021
    Posts:
    2
    what do i do for this error
    Assets\Standard Assets\Characters\ThirdPersonCharacter\Scripts\AICharacterControl.cs(11,16): error CS0246: The type or namespace name 'ThirdPersonCharacter' could not be found (are you missing a using directive or an assembly reference?)
     
  39. UNwon

    UNwon

    Joined:
    May 28, 2021
    Posts:
    2
    using System;
    using UnityEngine;

    namespace UnityStandardAssets.Characters.ThirdPerson
    {
    [RequireComponent(typeof (UnityEngine.AI.NavMeshAgent))]
    [RequireComponent(typeof (ThirdPersonCharacter))]
    public class AICharacterControl : MonoBehaviour
    {
    public UnityEngine.AI.NavMeshAgent agent { get; private set; } // the navmesh agent required for the path finding
    public ThirdPersonCharacter character { get; private set; } // the character we are controlling
    public Transform target; // target to aim for


    private void Start()
    {
    // get the components on the object we need ( should not be null due to require component so no need to check )
    agent = GetComponentInChildren<UnityEngine.AI.NavMeshAgent>();
    character = GetComponent<ThirdPersonCharacter>();

    agent.updateRotation = false;
    agent.updatePosition = true;
    }


    private void Update()
    {
    if (target != null)
    agent.SetDestination(target.position);

    if (agent.remainingDistance > agent.stoppingDistance)
    character.Move(agent.desiredVelocity, false, false);
    else
    character.Move(Vector3.zero, false, false);
    }


    public void SetTarget(Transform target)
    {
    this.target = target;
    }
    }
    }
     
  40. G_McClymont

    G_McClymont

    Joined:
    Oct 29, 2022
    Posts:
    1
    Thanks for this!
     
  41. RichAllen2023

    RichAllen2023

    Joined:
    Jul 19, 2016
    Posts:
    1,026
    Use CODE tags when displaying code here, I'm only telling you what guys like JeffUnity3D would tell you :D