Search Unity

Official Say hello to the new Starter Asset packages

Discussion in 'Assets and Asset Store' started by UnityHas, Jun 9, 2021.

  1. taigo1212

    taigo1212

    Joined:
    Feb 16, 2019
    Posts:
    1
    ¡Hola! Soy un principiante, tengo problemas con il input mobile. no funciona e hice lo mismo que en el video de youtube de la unidad
     
  2. rojbarak

    rojbarak

    Joined:
    Nov 17, 2021
    Posts:
    16
    Is there going to be an update for more locomotion options? New armature is great but missing some actions in animator states.
     
  3. iani_ancilla

    iani_ancilla

    Joined:
    Mar 8, 2020
    Posts:
    3
    Hello,
    using the First Person Controller in my project, thanks for providing these assets =)

    Quick (noob) question: I cannot manage to interact with UI elements at all when using the FP Controller.

    (I have tried this on a new empty project as well, with only the FP Controller imported, so it should not be something I messed in my project)

    Some context:
    What I would like to do is, when the player dies, have a game over canvas appear with interactable buttons.
    I added a UI action map to the StarterAssets input actions (I plain copy-pasted the map it from the default input actions), and linked it to the Event system. Normally when using the Input System this lets the UI action map be automatically used when interating with UI, even without having to switch maps.

    What I tried:
    • changing the Cursor Locked and Cursor Input For Look settings on the Starter Assets Inputs component when the canvas is enabled. No luck.
    • Disabling the Player (I have moved the PlayerInput component away from the player, since I am using it set to Invoke Unity Events and not to Send Messages). No luck.
    • Actively switching action map to UI. No luck.
    I am a semi-beginner, I read through the scripts but could not find a reason for this. Any help would be very much appreciated.
     
    kenmaready likes this.
  4. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    961
    One more thing I really dislike about Character Controller: you can either see its collider gizmo, or you can see transform gizmo, NEVER BOTH.

    And I am using Unity 2021.2
     
  5. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437
    hello
    after we make a controller with the new input system if it is installed in a project that did not yet have installed this from package manger it would fail to compile >>>

    do we have a way to see this at time of unpacking a .unitypackage and ask / open the package manager to have them download the input system ?
     
  6. bronsonzgeb

    bronsonzgeb

    Unity Technologies

    Joined:
    Aug 10, 2020
    Posts:
    101
    I noticed this issue as well recently. This version of the StarterAssetsInputs.cs should fix the issue. Setting the
    CursorLocked
    property (rather than the
    cursorLocked
    variable) will correctly change the current cursor locked state.
     
    kenmaready and iani_ancilla like this.
  7. bronsonzgeb

    bronsonzgeb

    Unity Technologies

    Joined:
    Aug 10, 2020
    Posts:
    101
    It should download the dependencies automatically before compiling any code that relies on the Input System. Can you post the error that prevents it from compiling? And also which version of Unity are you on?
     
  8. bronsonzgeb

    bronsonzgeb

    Unity Technologies

    Joined:
    Aug 10, 2020
    Posts:
    101
    ¿Podrías vincular el video de youtube? Me gustaría comprobarlo.
     
  9. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437

    hello
    so i ended u going with

    Code (CSharp):
    1. #if ENABLE_LEGACY_INPUT_MANAGER
    2. // new input installed, but disabled
    3. #elif ENABLE_INPUT_SYSTEM
    4. // new input installed, and enabled
    5. #endif

    however i found when you go into the project settings / player to change from old to new active input handling and the new input systems is not installed yet you go into compile errors

    it would be nice if some one changes the active input handling type it would point them to the package manager to install it

    Note i am working in standard from 2019.4.13 and higher / SRP api 10.4.0 + api 12.1.1 + as this is a asset that covers multiple pipelines and api versions
     
  10. bronsonzgeb

    bronsonzgeb

    Unity Technologies

    Joined:
    Aug 10, 2020
    Posts:
    101
    Yes I agree with you. I'll have it added to the tasks.
     
    DEEnvironment likes this.
  11. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437

    if possible it would be nice also to have a way to trigger a command to ask users to to install the new system from script so we can build this helper into assets that support it
     
    bronsonzgeb likes this.
  12. This already exists. You can install packages from script.
    https://docs.unity3d.com/Manual/upm-api.html
    The solution for this is version defines:
    https://docs.unity3d.com/Manual/ScriptCompilationAssemblyDefinitionFiles.html#define-symbols
    Although I'm fairly certain it is not available in 2019. But I may be wrong.
     
    Last edited by a moderator: Nov 24, 2021
  13. bronsonzgeb

    bronsonzgeb

    Unity Technologies

    Joined:
    Aug 10, 2020
    Posts:
    101
    Fwiw, this is what the Starter Assets package checker does (if you'd like to see some example code). However to ensure that it always runs in the future (even in the event of a failed compilation) we'll compile it into a DLL.

    If it's not in 2019 then that would explain the issue. We wrap all the Starter Assets code in the ENABLE_INPUT_SYSTEM define, but we only officially support 2020.3 and onward. Either way, we'll see if we can come up with a more robust solution.
     
    DEEnvironment and Lurking-Ninja like this.
  14. iani_ancilla

    iani_ancilla

    Joined:
    Mar 8, 2020
    Posts:
    3
    Thanks for taking the time to look into it!

    Strangely enough, the cursor does unlock now according to your changes, but any UI elements remain not interactable.
    I have been looking into Cursor.lockState and how it works but cannot find a reason for it.
     
  15. stickylab

    stickylab

    Joined:
    Mar 16, 2016
    Posts:
    92
    i dont like new input system cause its super complicated ,,,,and time consuming
     
  16. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    368
    Who is "we" in that sentence? 2019 LTS is supposed to be supported well into next year.

     
  17. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    368
    So it's been almost 6 months, no updates, no GitHub repo to feed issues and fixes into. Seriously, you'll get a whole community of free labor if you'd put this stuff into repos and monitor them, and they can be set up to auto-generate packages for you.
     
  18. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    368
    Has anyone noticed that the mouse steer in a build of the included Playground scene is a LOT slower than in the editor? I had to bump the Delta(Pointer) Scaled Vector 2 up to 100 to make it playable.

    upload_2021-11-27_6-20-4.png

    (I also moved A/D keyboard inputs down to allow for keyboard steer)
     
  19. vertexx

    vertexx

    Joined:
    Mar 18, 2014
    Posts:
    379
    Wait until you try 2021.2! Input system will seem easy after that! Unity excels in both difficulties and complications. Remember, Unity is still very much in beta stage. If it wasn't there wouldn't be any free versions of it at all. Good luck, Afakul. Keep trying.
     
  20. dimarco13

    dimarco13

    Joined:
    Jan 18, 2017
    Posts:
    1
    Dear, have you resolved "the character doesn't walk/run properly", because i have the same problem.
    In Windows mode it's ok, but not with Android mobile using mobile prefabs "UI_Canvas_StarterAssetsInputs_Joysticks". I do like doc but not walk or run, juste turn arround.
    Thanks
     
  21. Xerisis

    Xerisis

    Joined:
    Feb 19, 2016
    Posts:
    2
    Here is an issue I've found with the starter asset Third Person Controller. In a new project after importing and going into the Playground scene. As soon as you move your mouse if you scroll the mouse or click with either mouse button the camera will slightly move in whichever direction you were originally heading.

    So I checked in the Input Debugger and what I'm seeing is the Mouse Delta is changing to .25 or -.25. Even does it with the trackpad on my mac. Tested on my Windows 10 machine and get the same outcome so I know it's not a hardware issue.

    This causes issues because I am using mouse clicks to trigger attacks, which will make the camera move on it's own and the player will miss their target.

    EDIT* - Also not completely sure if it's an issue with the Starter Assets or Cinemachine itself...
     
    Last edited: Dec 4, 2021
  22. MathiasUnity1

    MathiasUnity1

    Joined:
    Oct 4, 2020
    Posts:
    5
    Hello Bronson & Unity content team
    First, thanks for the package. It's super useful for beginners like myself!

    Also, I was wondering if you knew why the Character gets reset when I use this code?


    Whenever I detach the Player from the Zipline (a primitive sphere), it gets teleported back to where it first started (when I disable the StarterAssetsInputs and ThirdPersonController scripts:

    Here is the part of the code, shortly before the character gets teleported back. Any idea why?

    Code (CSharp):
    1.     private void ResetZipline()
    2.     {
    3.         if (!zipping) return;
    4.  
    5.         GameObject PlayerArmature = localZip.transform.GetChild(0).gameObject;
    6.         PlayerArmature.GetComponent<Rigidbody>().useGravity = true;
    7.         PlayerArmature.GetComponent<Rigidbody>().isKinematic = false;
    8.         PlayerArmature.GetComponent<Rigidbody>().velocity = Vector3.zero;
    9.  
    10.         // Here, we need to re-enable the Character Controller and Input Script
    11.         PlayerArmature.GetComponent<StarterAssetsInputs>().enabled = true;
    12.         PlayerArmature.GetComponent<ThirdPersonController>().enabled = true;
    13.  
    14.         // Here, we detach the Player from the localZip object (the primitive sphere)
    15.         PlayerArmature.transform.parent = null;
    16.  
    17.         // Here, we destroy the localZip object (the primitive sphere)
    18.         Destroy(localZip);
    19.  
    20.         localZip = null;
    21.         zipping = false;
    22.         Debug.Log("Zipline reset");
    23.     }

    I noticed a similar issue, with another code (below) where my character doesn't jump.

    Code (CSharp):
    1.     void OnCollisionEnter(Collision collision)
    2.     {
    3.         if (collision.gameObject.CompareTag("Player")) //applies only to objects tagged with “Player”
    4.         {
    5.             Debug.Log("Player has entered JumpPlatform collider");
    6.             player = collision.gameObject;
    7.             //apply force to the Player's rigidbody to let him "jump"
    8.             player.GetComponent<Rigidbody>().AddForce(direction, ForceMode.Impulse);
    9.         }
    10.     }
     
  23. pakhtoon70

    pakhtoon70

    Joined:
    Aug 1, 2019
    Posts:
    2
    hi, I`m a beginner, I want to scale the player but the camera position remains the same as on start. Any Help?
     
  24. bronsonzgeb

    bronsonzgeb

    Unity Technologies

    Joined:
    Aug 10, 2020
    Posts:
    101
    The camera targets a transform that's separate from the avatar called PlayerCameraRoot. Moving that object will determine where the camera points.
     
  25. bronsonzgeb

    bronsonzgeb

    Unity Technologies

    Joined:
    Aug 10, 2020
    Posts:
    101
    I'm trying to figure out the full context. So when you enable the zipline you disable the ThirdPersonController and StarterAssetsInputs. Then, you take the PlayerAmature object and parent it under your zipline object. Then at the bottom you unparent the PlayerArmature and re-enable the two scripts. Is that accurate?
     
  26. bronsonzgeb

    bronsonzgeb

    Unity Technologies

    Joined:
    Aug 10, 2020
    Posts:
    101
    Oh I just noticed you're using Rigidbody. The starter assets were built to use CharacterController which is kind of incompatible with Rigidbody (or at least takes a lot of careful management). This could be a source of the problem?
     
  27. davidmarin07122

    davidmarin07122

    Joined:
    Dec 8, 2021
    Posts:
    1
    23vb.png
    hello. How can I activate the orbit option?
     

    Attached Files:

  28. Isgame-Studio

    Isgame-Studio

    Joined:
    Mar 26, 2017
    Posts:
    1
    Everything works well. But in the first person controller, when trying to look vertically up or down, a warning appears: "Look rotation viewing vector is zero". There is also a slight displacement of a few degrees. Is this how it should be or is there a way to fix it? Thanx for answer)
     
  29. bronsonzgeb

    bronsonzgeb

    Unity Technologies

    Joined:
    Aug 10, 2020
    Posts:
    101
    You can fix it by tweaking the clamp values like so:
     

    Attached Files:

  30. Steedalion

    Steedalion

    Joined:
    Jul 6, 2020
    Posts:
    51
    Do these touch controls work with unit remote? It works in an apk, but not via unity-remote. Am I missing something or is it not supported yet?
     
    czty3236969720 likes this.
  31. DiogoQueiroz

    DiogoQueiroz

    Joined:
    Feb 19, 2019
    Posts:
    9
    Based on this answer below:
    I found out where we can fix the CameraMovement issue of stuttering after changing to Dynamic Update in the Input System Package. Look for FirstPersonController.cs script and change the CameraRotation method. Where Time.deltaTime for Time.fixedDeltaTime and it should fix the camera using mouse. I didn't test it with Joystick inputs.
    Code (CSharp):
    1. private void CameraRotation()
    2. {
    3.   // if there is an input
    4.   if (_input.look.sqrMagnitude >= _threshold)
    5.   {
    6.     _cinemachineTargetPitch += _input.look.y * RotationSpeed * Time.deltaTime; // Change deltaTime with fixedDeltaTime.
    7.     _rotationVelocity = _input.look.x * RotationSpeed * Time.deltaTime; // Change deltaTime with fixedDeltaTime.
    8.  
    9.     // clamp our pitch rotation
    10.     _cinemachineTargetPitch = ClampAngle(_cinemachineTargetPitch, BottomClamp, TopClamp);
    11.  
    12.     // Update Cinemachine camera target pitch
    13.     CinemachineCameraTarget.transform.localRotation = Quaternion.Euler(_cinemachineTargetPitch, 0.0f, 0.0f);
    14.  
    15.     // rotate the player left and right
    16.     transform.Rotate(Vector3.up * _rotationVelocity);
    17.   }
    18. }
     
    Ghosthowl likes this.
  32. martire

    martire

    Joined:
    Feb 27, 2015
    Posts:
    36
    Hi :)
    How can I setup a footstep system in this new FP Controller?
     
  33. vertxxyz

    vertxxyz

    Joined:
    Oct 29, 2014
    Posts:
    109
    Yes, Dynamic Update is correct, but you shouldn't scale by Time.fixedDeltaTime, just reduce the sensitivity.
    My problem is more that this fixes stuttering with mouse input, but will introduce stuttering if you're using a joystick. Ideally the input system would have a way to just scale the joystick input by deltaTime and not the mouse delta, but I've never had anyone tell me how that's meant to be done.
    I can see you doing it by having two callbacks, but that seems kinda silly when the input system could perhaps do the scaling as a processor step.
     
    dkamp likes this.
  34. Daahrien

    Daahrien

    Joined:
    Dec 5, 2016
    Posts:
    100
    Looking pretty nice. I didn't until now :p Gotta try these out.
     
  35. Baluto41

    Baluto41

    Joined:
    Nov 12, 2021
    Posts:
    1
    Good afternoon! You have released a great asset and it is very useful for me. But there were a couple of questions:
    1) When playing the animation in place, everything looks great, but when the character moves in space, his leg twitches when walking. What could this be related to?
    2) I can't understand what the reason is, but sometimes something breaks and the camera starts to slow down and freeze when moving. No errors appear at the same time. I tried restarting the asset and restarting it.
     
  36. Snake111

    Snake111

    Joined:
    Mar 19, 2015
    Posts:
    16
    Great Asset, Can you explain how to add basic animation like slide on button down.
    thanks
     
  37. francy11

    francy11

    Joined:
    Apr 2, 2015
    Posts:
    5
    What does Non standard EULA mean? Can be used on commercial games? Or to build an asset on top of it and sell?
     
    Tigrian likes this.
  38. R1PFake

    R1PFake

    Joined:
    Aug 7, 2015
    Posts:
    542
    Will this be fixed in newer Unity versions? I have the newest LTS 2019 version and it still happens, the game always "lags" when I move while the player inspector is open, very annoying :(
     
  39. silent_rue

    silent_rue

    Joined:
    Jan 18, 2022
    Posts:
    2
    i have a question? if i jump on object with rigidbody the animation is looping on falling cuz it has not detect isground. how to fix this?
     
  40. teli-unity

    teli-unity

    Joined:
    Apr 6, 2017
    Posts:
    10
    I'm using the Third Person Controller asset (changed nothing) for windows, mac, Android, iOS, and WebGL. And obviously using a new Input System. Simply just added a simple script that disables the joysticks for non-touch devices.

    I dragged Joystick and other prefabs as mentioned in Unity's YouTube video. So it totally works fine for Keyboard and Mouse platforms (windows, mac, and WebGL). But not for touch devices (Android, iOS, and WebGL), as for touch devices UI joysticks for the move and look around should work only, but tapping on-screen anywhere does the look around too with the look around the joystick too. And obviously, move joystick calls both move and look around.

    I don't need the look around from full-screen touch. I just want to use move and look around joysticks to work, not the full screen to look around.

    NOTE: Unchecking Cursor Input For Look in Starter Assets Inputs, doesn't solve this issue.

    Any fix???
     
    Last edited: Jan 26, 2022
  41. bronsonzgeb

    bronsonzgeb

    Unity Technologies

    Joined:
    Aug 10, 2020
    Posts:
    101
    You could modify line 216 of ThirdPersonController to use the Controller's forward direction instead of the camera rotation like so:
    Code (CSharp):
    1. _targetRotation = Mathf.Atan2(inputDirection.x, inputDirection.z) * Mathf.Rad2Deg + _controller.transform.eulerAngles.y;
    2.  
     
    chelnok and UnityMagoo like this.
  42. bronsonzgeb

    bronsonzgeb

    Unity Technologies

    Joined:
    Aug 10, 2020
    Posts:
    101
    You can use it to build derivative works, even commercially. That includes games and assets. You just can't resell the exact same thing without changing it.
     
  43. bronsonzgeb

    bronsonzgeb

    Unity Technologies

    Joined:
    Aug 10, 2020
    Posts:
    101
    It's supposed to be! I agree that it's a real pain. It's entirely out of my control though :(
     
  44. bronsonzgeb

    bronsonzgeb

    Unity Technologies

    Joined:
    Aug 10, 2020
    Posts:
    101
    It's likely due to the layers. In the Inspector on the controller script you can specify which layers to consider as ground. Then you must apply these layers to your ground colliders.
     
  45. UnityMagoo

    UnityMagoo

    Joined:
    Dec 28, 2021
    Posts:
    17
    I'll try. Thanks.
     
  46. silent_rue

    silent_rue

    Joined:
    Jan 18, 2022
    Posts:
    2
    Thanks for reply, i already fix it.
     
  47. dkamp

    dkamp

    Joined:
    Feb 12, 2021
    Posts:
    17
    Hey there 2 questions from me:

    1) What is the analogue boolean in StarterAssetsInput for? Is this for gamepad joystick support? if so I assume I have to manually set this to true and then the magnitude seems to always be 1?
    2) The current implementation to move the camera simply uses input from user and changes the lookat transform, there doesn't seem much room for adjusting mouse and joystick sensitivity etc out of the box? Unless it is done on the actual InputAction?

    Prevously in my own 3rd person charactercontroller I have used the AxisState component in conjunction with my VirtualCamera to drive my camera using gamepad or mouse input and used InputValue Gain mode for gampad and Max Speed for mouse and joystick sensitivity (or vice versa, can't recall). This comes with built in clamping of values etc of course. I guess I'm just wanting to know which is the more correct and accurate way of getting mouse/analogue stick feedback. As I'm busy with a third person shooter so it's quiet an important aspect to the game I feel. Any views would be appreciated.

    Edit: I switched to unity 3rd person script as mine had a bug while walking down slopes that gave me many sleepless nights, so tried the starter asset and it fixed that however I wanted to see the "unity way" of driving camera input and I guess I'm just not sure if mine was better or not, out of the box I do get stuttering on the mouse, I'll try dynamic update, wondering if the joystick support needs me to set that bool and all will work? ... If so I can of course adjust the code to bring back the axisstate component to drive input but want to see if I've missed something
     
    Last edited: Feb 6, 2022
  48. LeoSkottzki

    LeoSkottzki

    Joined:
    Apr 9, 2013
    Posts:
    22
    Camera Rotation is Choppy. Rotation is smooth when a new project is started but after a few days the rotation of the camera becomes choppy. It is worse when the player armature is still, how ever the rotation is still very choppy if moving. the code is what I downloaded from the asset store.

    Code (csharp):
    1.  
    2. private void CameraRotation()
    3.         {
    4.             // if there is an input and camera position is not fixed
    5.             if (_input.look.sqrMagnitude >= _threshold && !LockCameraPosition)
    6.             {
    7.                 _cinemachineTargetYaw += _input.look.x * Time.deltaTime;
    8.                 _cinemachineTargetPitch += _input.look.y * Time.deltaTime;
    9.             }
    10.  
    11.             // clamp our rotations so our values are limited 360 degrees
    12.             _cinemachineTargetYaw = ClampAngle(_cinemachineTargetYaw, float.MinValue, float.MaxValue);
    13.             _cinemachineTargetPitch = ClampAngle(_cinemachineTargetPitch, BottomClamp, TopClamp);
    14.  
    15.             // Cinemachine will follow this target
    16.             CinemachineCameraTarget.transform.rotation = Quaternion.Euler(_cinemachineTargetPitch + CameraAngleOverride, _cinemachineTargetYaw, 0.0f);
    17.         }
    18.  
     
  49. bronsonzgeb

    bronsonzgeb

    Unity Technologies

    Joined:
    Aug 10, 2020
    Posts:
    101
    The analog movement boolean determines whether it reads the input from the move vector, or if all movement is read as a magnitude of 1. The move vector is set by the Input System, so it's primarily for joysticks like you said. There might be an option to simulate analog movement on keyboards in the Input System though? I don't recall.

    The control for sensitivity is on the input action itself, so it's controlled inside the InputActions file. You could always add your own multiplier if you need more control.

    If it helps, the starter assets were not designed to be full production-ready character controllers. They're intended to be dropped into a project to get you started (hence starter asset), but also to be easily hackable, so you can develop your controller alongside your project to suit your needs. I guess what I'm saying is if you're satisfied with your personal controller don't feel like you have to switch to this one. The team sacrificed a lot of features to keep the code very simple and in many games the character controller is the code that defines much of the game experience, so it's important to follow your intuition and use what works best for your project. Maybe in your case that means integrating the aspects of your controller that worked with the pieces of this one that work.
     
    ch715t0 and dkamp like this.
  50. adenilsonantonioromao

    adenilsonantonioromao

    Joined:
    Sep 7, 2020
    Posts:
    1
    I really tried everything but I couldn't configure anything for mobile. definitely the touch doesn't work for me and no message appears. I followed all the steps and videos I found. I searched the forums and nothing