No video

3D Survival Game Tutorial | Unity | Part 3: Selecting Items with Raycast & Creating Simple AI

  Рет қаралды 55,609

Mike's Code

Mike's Code

Күн бұрын

#survivalgame #tutorial #unity
In this tutorial series, we will create a 3D survival game with Unity & C# as the scripting language.
We will start with basic FPS movement, inventory building, and crafting systems.
Learn how to pick up items and more.
Little by little, we are going to add different features that are common to survival open-world games.
This series is a bit more advanced and fast-paced, but I will try to explain everything I do.
Any questions are welcome.
Selection Manager Script:
pastebin.com/k...
InteractableObject Script:
pastebin.com/M...
Ai Movement Script:
pastebin.com/m...
White Rabbit free asset:
assetstore.uni...
Sphere/Circle Sprite
drive.google.c...
Survival Series Playlist:
• Unity 3D | Open-World ...
💾💾💾💾💾💾💾💾💾💾💾💾💾💾💾💾💾💾💾💾💾
Between my full-time job and my family life,
I try to find free time to create content for this channel.
You can support me and help this channel keep growing:
paypal.me/Mike...
💾💾💾💾💾💾💾💾💾💾💾💾💾💾💾💾💾💾💾💾💾
💻 This Is My Development Setup (Affiliate): 💻
============
Main Monitor:
amzn.to/3M64qCJ
Secondary Monitor:
amzn.to/41Iu06A
Graphics Card:
amzn.to/3MpnXzd
CPU:
amzn.to/3I8nvCW
RAM:
amzn.to/42zqM6u
Keyboard:
amzn.to/3W5RFN4
Mouse:
amzn.to/3nTPcZs
Headphones:
amzn.to/3pz0By5
Microphone:
amzn.to/3OecJz3

Пікірлер: 353
@timothygaming9405
@timothygaming9405 Жыл бұрын
For anybody getting the object not set to an instance ... And that is using TextMeshPro in the newer Unity Versions Here is what you should do Add this to the top of the selectionmanager: using TMPro; Then u also have to change these 2 lines: Text interaction_text; --------------> TextMeshProUGUI interaction_text; interaction_text = interaction_Info_UI.GetComponent(); ---------------> interaction_text = interaction_Info_UI.GetComponent(); I hope this helps :)
@gibenkozak4448
@gibenkozak4448 Жыл бұрын
Thanks bro, you make my day easier :D
@timothygaming9405
@timothygaming9405 Жыл бұрын
@@gibenkozak4448 No Worries, I didn't want anyone else to go through the same struggle haha
@richardwhite7728
@richardwhite7728 Жыл бұрын
You rock, thank you!
@lukasbraithwaite393
@lukasbraithwaite393 Жыл бұрын
bloody legend thanks a lot man I was pulling hair out because of this.
@mirhanozden522
@mirhanozden522 8 ай бұрын
Legend for telling everybody 👍👍
@bobbysmurf9915
@bobbysmurf9915 Жыл бұрын
If your like me and don't want the selectionmanager to select stuff across the map, you can simple change this if (Physics.Raycast(ray, out hit)) to if (Physics.Raycast(ray, out hit, 10))
@berkeaytan5506
@berkeaytan5506 Ай бұрын
Great advice, thanks. But when you do so, the text update only occurs within that range and for instance if you hover over that object and move away while looking towards it, it (text object) will be stuck on that state and only will be updated when nearby an interactable object or the first one you locked onto.
@connorpayne2671
@connorpayne2671 Ай бұрын
@@berkeaytan5506 This is the solution to that Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit hit; if (Physics.Raycast(ray, out hit, interactRange)) { if(hit.collider.GetComponent() != null) { var selectionTransform = hit.transform; if (selectionTransform.GetComponent()) { interactionText.text = selectionTransform.GetComponent().GetItemName(); interaction_Info_UI.SetActive(true); } } else { interaction_Info_UI.SetActive(false); } } if(hit.collider == null) interaction_Info_UI.SetActive(false);
@connorpayne2671
@connorpayne2671 Ай бұрын
I also added a public float, which is what the "interactRange" is
@bobbysmurf9915
@bobbysmurf9915 Ай бұрын
@@connorpayne2671 Nice job, keep following this tutorial! I took a long break but once you start learning more, unity becomes very fun and a very powerful engine to use.
@alexd1362
@alexd1362 Жыл бұрын
First off, amazing tutorials and explanations! The best I have came across, great at explaining the little details. I laughed so hard when you were creating the rabbits and you went over one and said "oh I stepped on one" as if the rabbit felt it. Keep doing what you are doing, we really appreciate it!!!
@daywedie
@daywedie Жыл бұрын
Alright, first of all, I'm loving this tutorial series. I'm planning to follow them through until I have something cool playable. Second, reading some comments about problems other had, and making a little research, I found a way to use TextMeshPro instead of the legacy text. your code should be something like this: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using TMPro; public class SelectionManager : MonoBehaviour { public GameObject InteractionInfo; TextMeshProUGUI interaction_text; private void Start() { interaction_text = InteractionInfo.GetComponent(); } void Update() { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit hit; if (Physics.Raycast(ray, out hit)) { var selectionTransform = hit.transform; InteractableObject interactable = selectionTransform.GetComponent(); if (interactable) { InteractionInfo.SetActive(true); interaction_text.text = interactable.GetItemName(); } else { InteractionInfo.SetActive(false); } } } } The gist of it is using TextMeshProUGUI as a variable type, instead of just TextMeshPro. Don't forget to use "using TMPro" at the top of the code too. Hope this helps someone.
@zuzumaster6809
@zuzumaster6809 Жыл бұрын
helped me a ton although I got a ton of errors and have no clue what to do
@zuzumaster6809
@zuzumaster6809 Жыл бұрын
nevermind fixed
@RatSpit
@RatSpit 10 ай бұрын
Thank you so much!!!! @daywedie
@ConsoleWrite-lx1yh
@ConsoleWrite-lx1yh 10 ай бұрын
Thank you brother!
@Dazeza
@Dazeza 8 ай бұрын
My code problem 'InteractableObject' could not be found, pls help me 😢
@thuongtrinhvan2001
@thuongtrinhvan2001 2 ай бұрын
For anybody have a problem with the rabbit face down when idle state, you should freeze the x and y rotation in rigidbody
@ETAFree
@ETAFree Ай бұрын
ồ thank kiu bro.
@thedrumminggeek5436
@thedrumminggeek5436 Жыл бұрын
for anyone who has problems with the item name not showing when you look at an object, Make sure that the object has a collision box. I've been pulling my hair out for hours with this problem, yet the solution was kind of obvious haha. Could just be a problem for me because I'm using different assets. anyways, love your videos and how you explain everything. Thanks man
@Evelyn-dh4zp
@Evelyn-dh4zp Жыл бұрын
The asset I'm using has colliders already but I am still having that problem... Any suggestions on how to fix it?
@muddy11112
@muddy11112 4 ай бұрын
Thanks bro, I was also pulling my hair out
@luc9430
@luc9430 21 күн бұрын
The solution to all my problems xD. Thanks
@TinkeringNoob
@TinkeringNoob 4 ай бұрын
If you cant find the animator tab, its under window in the ribbon alog the top window/animation/animator if you are getting The type or namespace name 'InteractableObject' could not be found. its because you need to create a seperate c# script named 'InteractableObject' and then place the code in description for it in it.
@MrThijsdc
@MrThijsdc Жыл бұрын
Hey Mike, Thanks for the tutorial. Just a small suggestion: it's always very helpful to provide the assets you use in your tutorial to the viewer. For example, even something simple as importing that white sphere you use for the reticle took me like two hours since I needed to download image software and figure out how to create the right type of image.
@PaulMartin-zc9oj
@PaulMartin-zc9oj Жыл бұрын
You can adjust the type of image, change to sprite etc inside of Unity. Just make sure you have the 2D sprite addon added in the package manager. Once installed just click on the image in the project window and in the inspector you can change it to whatever you need. Sprite, cursor whatever. Window > package manager > select unity registry and install from there. There are tons of tools in there for image and atlas editing. Cheers
@SAVAGEGHXST420
@SAVAGEGHXST420 Жыл бұрын
for future reference there is a thing called knob in the 2023 version for me not sure were it came from but it does not go to anything ive imported and its already pre made for crosshair
@connorpayne2671
@connorpayne2671 Ай бұрын
@@SAVAGEGHXST420 It's for the sliders. I'm pretty sure they've been around for a while. I'm using the 2022 version and I have it too, so that's what I was using
@TheRealKaiProton
@TheRealKaiProton Жыл бұрын
Im really enjoying going over these videos, Ive never really working in 3d, and these explanations are really good. Ive had various problems when adding stuff to the game world, and had a lot of fun tracking down the issues, and figuring out where I went wrong.
@DJLKM1
@DJLKM1 Жыл бұрын
An addition to your raycast would be a float for ray distance, otherwise you will hit everything in the game world. So = if(Physics.Raycast(ray, out hit, 2f)).
@InfidelAtWork
@InfidelAtWork 9 ай бұрын
It is a good solution but... When i increased a distance from this object the text won't disappear. Any idea?
@SovietAra
@SovietAra 8 ай бұрын
@@InfidelAtWork bool isHit = Physics.Raycast(ray, out hit, 2f); if (isHit) { var selectionTransform = hit.transform; if (selectionTransform.GetComponent()) { interaction_text.text = selectionTransform.GetComponent().GetItemName(); interaction_Info_UI.SetActive(true); } } else { interaction_Info_UI.SetActive(false); }
@anasouladbenlahcen
@anasouladbenlahcen Жыл бұрын
best tutorials i ever seen about unity thank you so much
@tenzindayoe5783
@tenzindayoe5783 Жыл бұрын
One of the best tutorials out there !
@Super_Nova919
@Super_Nova919 Жыл бұрын
I subscribed because of how good this tutorial is :)
@Warp_Speed_Studios
@Warp_Speed_Studios Жыл бұрын
21:07 you might already know this but if you hold right mouse button you can use wasd to move
@seanpainter9070
@seanpainter9070 Жыл бұрын
how come when im trying to sort out the selection manager the interaction info ui doesnt show up please help
@Leaks_the_vegetable
@Leaks_the_vegetable 2 ай бұрын
If you are having trouble with the selection script you first also have to have the interactable object scripts
@linctheweightlifter04
@linctheweightlifter04 2 ай бұрын
what do you put the interactable object script on?
@Leaks_the_vegetable
@Leaks_the_vegetable 2 ай бұрын
Any object like a rabbit or rock that you want to interact with
@toycat263
@toycat263 Жыл бұрын
READ IF YOU CANNOT GET YOUR TEXT TO SHOW WHEN YOU HOVER OVER AN INTERACTABLE OBJECT: (this worked for me) -Ensure that the interactable object has a collider on it. If its an asset that you made yourself or different to the one Mike is using, input a mesh collider - when you click play, make sure you actually click into the game (ur PC Cursor should disappear when you click into the game). Your camera will be able to move while ur not actually clicked into the game, but the UI won't work untill your cursor disappears by clicking into the game. This should fix the problem.
@FlamberetElg
@FlamberetElg Жыл бұрын
I have a problem with the script, mine says: Assets\Scripts\SelectionManager.cs(25,49): error CS0246: The type or namespace name 'InteractableObject' could not be found (are you missing a using directive or an assembly reference?) how do i fix this?
@toycat263
@toycat263 Жыл бұрын
@@FlamberetElg at the top of the script, you should have "using UnityEngine;" Underneath it, type using "UnityEngine.UI;" This might fix the problem. give it a shot
@TheRealKaiProton
@TheRealKaiProton Жыл бұрын
@@FlamberetElg Is this what I did, and looked at the code, so you needed to keep on the video for a bit until you create the interactable script? also mine didnt work, until I figured out I was using TextMesh Pro, that calls the text component in a different way, as soon as I moved it back to Legacy, it was fine.
@Dialogues_about_Ukraine
@Dialogues_about_Ukraine 8 ай бұрын
Mike thank you for your tutorials! It's motivate me to explore all details and even try to do some modifications.
@kenware9578
@kenware9578 7 ай бұрын
Error whiile in playmode: "object reference not set" on SelectionManager script copy and paste this, Note: In the unity editor you will need to drag the players camera into the "Camera" reference using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI; public class SelectionManager : MonoBehaviour { public Camera playerCamera; public GameObject InteractionInfo; TextMeshProUGUI interaction_text; private void Start() { interaction_text = InteractionInfo.GetComponent(); } void Update() { Ray ray = playerCamera.ViewportPointToRay(new Vector3(0.5f, 0.5f, 0)); RaycastHit hit; if (Physics.Raycast(ray, out hit)) { var selectionTransform = hit.transform; InteractableObject interactable = selectionTransform.GetComponent(); if (interactable) { InteractionInfo.SetActive(true); interaction_text.text = interactable.GetItemName(); } else { InteractionInfo.SetActive(false); } } } } Hope this helps
@ConsoleWrite-lx1yh
@ConsoleWrite-lx1yh 7 ай бұрын
Brooo! Thank you so much I've been struggling finding the solutions and I see your comment and it solved the problem! Thank youuu have a nice day!
@linctheweightlifter04
@linctheweightlifter04 2 ай бұрын
Hey man, this seems to be helping for me but idk how to drag the players camera into the "Camera" reference lol, do you think you could describe it a little bit more for me?
@funkmunki
@funkmunki Ай бұрын
Thank you so much!
@proxgamer1082
@proxgamer1082 24 күн бұрын
Thank you so muchhhhhhhh I was about to quit my game development bcuz of this
@RamenNooNoos
@RamenNooNoos 3 ай бұрын
Hey guys, I'm sorry for those who are looking for answers to their errors, so if you're getting the error about the interactable object in the selection manager script all you need to the is make sure you have the interactable script imported with the stuff mike has. hope this helped some of u
@Micul_Pescar6
@Micul_Pescar6 18 күн бұрын
Thank you broo 👍🏿👍🏿
@PorkinsRevenge
@PorkinsRevenge Жыл бұрын
So here's an interesting question. Here's the setup: The trees that I'm using to do this tutorial are from a pack I've already purchased. I did everything correctly to set up the text per Mike's instructions. But it just wasnt doing anything. So after double checking it, I added some debug messages to the SelectionManager Script.. I had it tell me after the hit what transform it was finding, and after the if statement where it was looking for InteractableObject, whether or not if found it. It was making a hit, but the transform it returned was the LOD0, not the parent. So, it was not finding the Interactable Object. It took me a second to recognize that it wasnt testing the parent of the Tree... because the hit was being made on it's LOD0... and so when I put InteractableObject on it's LOD it worked fine... It didnt matter whether or not the tree was rendering LOD4, as long as the code was attached to LOD0 it worked fine... Does this sound like it's working as designed to you all? Do you think I should report it to Unity as a bug? Anyway for anyone using a different tree... Hopefully this comment will help, and hopefully it will save you the proverbial banging of the head against the wall i did.
@PorkinsRevenge
@PorkinsRevenge Жыл бұрын
After looking deeper into this it's because the asset creator added the capsule collider to LOD 0, not to the parent. So, after putting the collider on the parent it all worked just fine... be aware if you're having this problem, that leaving the interaction on the LOD will only let you interact with the LOD... So, thats not really a solution. I.e. if you were to have the cut tree down script on that LOD you'd only be cutting down the LOD. It would look normal when you are up close and actually interacting with the tree, BUuuuuut when you move away from the tree LOD 1 would materialize as if it were magic... and then when you move closer to the tree, and it tries to load LOD 0... the tree would then disappear again... so if you are having the problem that I first described... move the Collider to the main parent of the tree.
@alexbaring8461
@alexbaring8461 Жыл бұрын
I have this really weird issue, everything is working fine but when the rabbits are idle on a sloped surface they just face plant into the ground and try to hop into the ground, when the idle timer is up and they start start to run again it goes back to normal until they idle on a slope again. does anyone have the same problem or does anyone know how to fix it
@zorny_
@zorny_ Жыл бұрын
Hey, had the same problem, it is actually fixed in the next episode, in case you didn't see it, jus go into your rabbit's prefab and in the rigidbody>constraints, freeze the x and z rotation. It should fix everything
@chenkevin4620
@chenkevin4620 Жыл бұрын
i love you,this is best tutorials i've seen
@dkordy
@dkordy Жыл бұрын
Hi, I like the way you explain, glad I found you. I will definitely follow this series. It would also be good if, during the explanation, you would add how the script would be done if, for example, instead of the first person, you used the third person, what would the difference be.. As for the rest, it's a really good tutorial... Best regards, and keep up the good work ...subscribed
@Evelyn-dh4zp
@Evelyn-dh4zp Жыл бұрын
It would be pretty much the same. You just would want to have a humanoid for a player and move the position of the camera so you can see the player. From what I know that is all you would really have to do
@SmartLearningAI
@SmartLearningAI 3 ай бұрын
Also: Change the Box Collider to enable Trigger. Next Add Navmesh agent component to each the rabbit prefab and set Base Offset to like -0.10. Disable the original AI_Movement Script or replace it with AI_Movement_Navmesh script. Add a NavMeshSurface (if you don't have one already) component to your Terrain and Bake. (I use Unity 2022.3.25f1)
@gandalfthew439
@gandalfthew439 Жыл бұрын
If text doesn't appear when you hover over the object with cursor, try adding collider to your prefab. That's how it worked in my project.
@Warp_Speed_Studios
@Warp_Speed_Studios Жыл бұрын
im kinda dumb, but whats a prefab
@Warp_Speed_Studios
@Warp_Speed_Studios Жыл бұрын
nvm
@gandalfthew439
@gandalfthew439 Жыл бұрын
@@Warp_Speed_Studios Actually, I don't know exactly 😄Probably some sort of object in the game.
@skoonahyvampire6084
@skoonahyvampire6084 Жыл бұрын
For the most part it is working, the only problem is that the interactable text doesn't disappear when I look away from the object everytime. Not sure if this is a collision issue, I am using the mesh collider for my objects. It is almost as if it randomly decides when the text should disappear. I am using legacy text not text mesh pro.
@skoonahyvampire6084
@skoonahyvampire6084 Жыл бұрын
He talks about it in the 4th part if anyone found this.
@user-hc3ky5re8j
@user-hc3ky5re8j Жыл бұрын
i have the same problem@@skoonahyvampire6084
@eden5929
@eden5929 9 ай бұрын
If you’re having trouble with the text not showing and its not to do with colliders or ur mouse, I realised that I had 2 cameras operating, one main camera and one camera for the player. Because the script is directed at the main camera it wasnt detecting any rays! I changed the code to be camera.current instead of camera.main (but i think a better solution would be to have only ur main camera active I am just too tired to be bothered to change everything rn). Hope this helps!!!
@roviot44
@roviot44 3 ай бұрын
Awesome tutorials! TYSM! 💪
@itxazizzz
@itxazizzz 4 ай бұрын
I have issue on this selectionmanager script it gives me null reference object error please help mei to fix this
@DAHDOOH
@DAHDOOH Ай бұрын
yes please
@WPxenowolf
@WPxenowolf 6 ай бұрын
If you are getting : NullReferenceException: Object reference not set to an instance of an object SelectionManager.Update () (at Assets/Scripts/SelectionManager.cs:21) make sure your camera is tag MainCamera
@NoldGiggerVEVO
@NoldGiggerVEVO 4 ай бұрын
i am
@MultiDegh
@MultiDegh 11 ай бұрын
When i reach the point of adding the component Selection Manager i dint get the Interaction_info_UI, the same when i add the component Interactable object i dont get the Item Name option that appears in your video. it seems that many are having this issue. is there a way to fix this, i tried everything so far, out of ideas...
@alphazero4102
@alphazero4102 9 күн бұрын
Hi, have you found a solution to this problem?
@v_xx_official
@v_xx_official 10 ай бұрын
I got this error what do i do: Assets\Scripts\SelectionManager.cs(9,43): error CS1002: ; expected
@v_xx_official
@v_xx_official 10 ай бұрын
Its for the selection manager
@dudek1499
@dudek1499 Жыл бұрын
Hi Mike I have 1 problem after I write "using UnityEngine.UI" on the top of script I have this error Assets\Scripts\SelectionManager.cs(1,21): error CS1002: ; expected Can you help me?
@Obliterator786
@Obliterator786 10 ай бұрын
You are mising " ; "
@Properpeanut
@Properpeanut Жыл бұрын
To raycast to the center of the screen use: Ray ray = Camera.main.ViewportPointToRay(new Vector3(0.5F, 0.5F, 0)); Instead of; Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); The mouse will not always be at the center of the screen.
@eeni14
@eeni14 Жыл бұрын
In the previous tutorials he locked the cursor to the center, would this still be a problem?
@bobbysmurf9915
@bobbysmurf9915 Жыл бұрын
@@eeni14 No
@ivanpriz4547
@ivanpriz4547 11 ай бұрын
@@eeni14 Yeah, it still was, guess somewhy even with locking cursor mouse position can be offset from the center, I struggled with it.
@InfidelAtWork
@InfidelAtWork 9 ай бұрын
i agree with @SP261280. This solved my problems with displaying text on screen.
@matheusbosc
@matheusbosc Жыл бұрын
for the sphere, i just used the UI text and plus sign
@virtualgodwin9088
@virtualgodwin9088 Жыл бұрын
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class SelectionManager : MonoBehaviour ... But nothing, in inspector the "Selection Manager" script does not add the "Interaction_Info_UI" option
@oArzoh
@oArzoh Жыл бұрын
Got the exact same problem
@virtualgodwin9088
@virtualgodwin9088 Жыл бұрын
@@oArzoh at minute 14 he explains it (he could have said it earlier...):
@siureksmoka989
@siureksmoka989 10 ай бұрын
a hero without a cape
@advaitmoreyt96
@advaitmoreyt96 13 сағат бұрын
I have elevated terrain, and every single time they go inside the terrain.... how can I fix this?
@SAVAGEGHXST420
@SAVAGEGHXST420 Жыл бұрын
{can someone help please} ive ran through this vid before on other projects and the [Selectionmanager] and [interactableobjects] files (WORKED) but now they dont show names and ive ran through it over and over and cant fix it
@z7gu3
@z7gu3 Жыл бұрын
error i cant seem to fix Assets\SelectionManager.cs(11,5): error CS0246: The type or namespace name 'Text' could not be found (are you missing a using directive or an assembly reference?)
@Obliterator786
@Obliterator786 10 ай бұрын
Here is updated script using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; public class SelectionManager : MonoBehaviour { private TextMeshProUGUI textMeshPro; public GameObject interaction_Info_UI; TextMeshProUGUI interaction_text; private void Start() { textMeshPro = GetComponent(); interaction_text = interaction_Info_UI.GetComponent(); } void Update() { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit hit; if (Physics.Raycast(ray, out hit)) { var selectionTransform = hit.transform; if (selectionTransform.GetComponent()) { interaction_text.text = selectionTransform.GetComponent().GetItemName(); interaction_Info_UI.SetActive(true); } else { interaction_Info_UI.SetActive(false); } } } }
@iTwonky
@iTwonky 6 ай бұрын
write "using Unity.Engine.UI" on the top of your code
@mostlycarbon9576
@mostlycarbon9576 5 ай бұрын
When my bunnies stop hopping and they should sit still (idle) they kinds slide forward slowly.. then they turn and hop around, then stop and slide slowly.... lol. Any ideas? The rotation on x and z is locked so that bit is solved. They sit still and slide like they're on a skating ring.
@oArzoh
@oArzoh Жыл бұрын
at 08:27 when i drag the script to the empty object, i don't get the second row called "Interaction_info_UI". Any solutions to this? I also get this error message when pasting the SelectionManager script code into visual studio: Assets\Scripts\SelectionManager.cs(9,5): error CS0246: The type or namespace name 'Text' could not be found (are you missing a using directive or an assembly reference?) I tried doing this with both the TextMeshPro and the normal Text but still the same error
@castleexe2968
@castleexe2968 Жыл бұрын
Add using UnityEngine.UI; on the top
@oArzoh
@oArzoh Жыл бұрын
@@castleexe2968 Ty for answer man but that didn't work either :/ still no window for interaction_info_ui
@nexno27
@nexno27 Жыл бұрын
@@oArzoh i also dont have the window
@Esizl
@Esizl Жыл бұрын
14:00 to about 17:55 he explains it
@Obliterator786
@Obliterator786 10 ай бұрын
Here is updated script using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; public class SelectionManager : MonoBehaviour { private TextMeshProUGUI textMeshPro; public GameObject interaction_Info_UI; TextMeshProUGUI interaction_text; private void Start() { textMeshPro = GetComponent(); interaction_text = interaction_Info_UI.GetComponent(); } void Update() { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit hit; if (Physics.Raycast(ray, out hit)) { var selectionTransform = hit.transform; if (selectionTransform.GetComponent()) { interaction_text.text = selectionTransform.GetComponent().GetItemName(); interaction_Info_UI.SetActive(true); } else { interaction_Info_UI.SetActive(false); } } } }
@bradmerrill6220
@bradmerrill6220 Жыл бұрын
The ground level for my terrain is y position 0, My rabbits y position is 0 as well. For some reason when I start the game, the rabbit's y position will jump up to .25 and stay there while the game runs indefinitely. This problem causes the rabbit to look like it is slightly floating while jumping around. If I use the constraint on the rigidbody to freeze the y position...It messes with the speed of the rabbit and the animation itself. Anyone else experiencing this problem? can't think of any other fixes for it.
@asylumblack9122
@asylumblack9122 Жыл бұрын
sounds like the collider is lower then the rabit, making the rabit seems like floating because the colider touches the ground (the colider is the actual rabit) and the mesh (the rabit) is above so check that thing for furture 'floating' missunderstanings (the collider needs to be at the very feet of the mesh/rabit, maybe even .01 upper then the mesh but never lower)
@bradmerrill6220
@bradmerrill6220 Жыл бұрын
@@asylumblack9122 I finally figured it out, and that is exactly what the problem was. I was making different sized rabbits and the box collider wasn't scaling with the resizing of the rabbits and I didn't catch it. I didn't have the rabbit selected in the Hierarchy tab to see what the box collider looked like on it in the scene tab when running the game. If I hadn't of figured it out on my own...I was planning on coming back here this week to see if anyone replied. I appreciate the help! Thank you sir.
@v_xx_official
@v_xx_official 10 ай бұрын
On my script i dont have the part where you add text
@linkiyttv
@linkiyttv Жыл бұрын
fantastic video u helped me a lot
@inzainiaplays
@inzainiaplays 9 ай бұрын
im new, and in the newer unity following this tutorial and all is working except the animator section. I cannot for the life of me figure out how to add the isrunning and isdead variables anywhere as mine opens up as read only. any ideas? the bunny stays in the idle animation and moves around per the code, randomly choosing a direction and time, it just doesnt swap from the idle to the running animation. ***edit but leaving for others*** under window/animation/animator parameters is the window to add the isrunning and isdead, it is not in the animation window, its in the animator window, which is activated in the same place. window/animation/animator.
@TinkeringNoob
@TinkeringNoob 4 ай бұрын
I love you thank you!😂
@reinhardgercken5362
@reinhardgercken5362 2 жыл бұрын
Please can you link your scripts; I like this form of tutorial, you made it verry well
@qsnowwy
@qsnowwy Ай бұрын
If anyone else is getting “object not set to instance” what worked for me was going to my Camera and changing the tag to Main camera
@iannewton3820
@iannewton3820 Жыл бұрын
@Mike's Code where is the Interactable Object script?
@vuropetz4763
@vuropetz4763 Жыл бұрын
9:15 i get this error when i import the script Assets\Scripts\SelectionManager.cs(3,33): error CS0246: The type or namespace name 'MonoBehaviour' could not be found (are you missing a using directive or an assembly reference?)
@Obliterator786
@Obliterator786 10 ай бұрын
here is the updated script using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; public class SelectionManager : MonoBehaviour { private TextMeshProUGUI textMeshPro; public GameObject interaction_Info_UI; TextMeshProUGUI interaction_text; private void Start() { textMeshPro = GetComponent(); interaction_text = interaction_Info_UI.GetComponent(); } void Update() { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit hit; if (Physics.Raycast(ray, out hit)) { var selectionTransform = hit.transform; if (selectionTransform.GetComponent()) { interaction_text.text = selectionTransform.GetComponent().GetItemName(); interaction_Info_UI.SetActive(true); } else { interaction_Info_UI.SetActive(false); } } } }
@Salt_king1611
@Salt_king1611 3 ай бұрын
Did you find out how (im having the same problem)
@Benbot2514
@Benbot2514 Жыл бұрын
Hey @MikeSchvedov i keep getting an error that says the file name and class name doesn't match. How do i fix this? (Btw this tutorial is absolutely amazing thank you so much)
@Mikes-Code
@Mikes-Code Жыл бұрын
Its some bug in unity. Just delete the script, and create a new one. It happens when we create a script but press enter instead of giving it a name right away. Most importantly make sure that when you give the script a name, it stays the same inside the script (Class name).
@Benbot2514
@Benbot2514 Жыл бұрын
@@Mikes-Code Thank you!
@psychologe112
@psychologe112 Жыл бұрын
Did all like in the tut and got this Assets\Scripts\SelectionManager.cs(10,5): error CS0246: The type or namespace name 'Text' could not be found (are you missing a using directive or an assembly reference?)
@psychologe112
@psychologe112 Жыл бұрын
for all who strugle with this i figured it out, he does not mention that you have to add " using UnityEngine.UI;" in the manager script on top. i can also recomend do not to follow the tutorial step by step because it will lead to errors look the full video then try it. because he mention script that are needet before to late, this will lead to errors if you try to recreate step by step.
@fyszen9767
@fyszen9767 Жыл бұрын
@@psychologe112 ty
@pureluck8882
@pureluck8882 Жыл бұрын
Make sure you have the 5th script created like in the video : "using System.Collections; using System.Collections.Generic; using UnityEngine; public class InteractableObject : MonoBehaviour { public string ItemName; public string GetItemName() { return ItemName; } }"
@Lerya9
@Lerya9 Жыл бұрын
@@psychologe112 thanks
@hartlap
@hartlap Жыл бұрын
@@pureluck8882 THANX BRO
@lucaselkinson3591
@lucaselkinson3591 5 ай бұрын
"InteractableObject" not found Solutions within the SelectionManager code?
@TinkeringNoob
@TinkeringNoob 4 ай бұрын
You need to create a separate script, call it InteractableObject and place the code in the description in it.
@eternaldream8361
@eternaldream8361 9 ай бұрын
NullReferenceException: Object reference not set to an instance of an object SelectionManager.Update () (at Assets/Scripts/SelectionManager.cs:19) i have this Problem please tell me How can fix that ?
@macadamion-
@macadamion- 6 ай бұрын
broooo i had the same problem but i managed to figure it out, what i had to do was take off text mesh pro. it has to be regular text, it probably is way to late but hey, i tried.
@Evelyn-dh4zp
@Evelyn-dh4zp Жыл бұрын
When trying to get the object name by looking at an object I get this error: "NullReferenceException: Object reference not set to an instance of an object SelectionManager.Update () (at Assets/Scripts/SelectionManager.cs:28)" Does anyone know how to fix this? I've been trying but I just can't figure it out.
@Mikes-Code
@Mikes-Code Жыл бұрын
Hey, It says that the problem is on line number 28 of the SelectionManager. What are the objects you have on this line? One of them is missing a reference. Can you copy and paste the code of this line over here? Maybe I can help, although its usualy hard without being in front unity itself.
@Evelyn-dh4zp
@Evelyn-dh4zp Жыл бұрын
@@Mikes-Code interaction_text.text = selectionTransform.GetComponent().GetItemName();
@Mikes-Code
@Mikes-Code Жыл бұрын
@@Evelyn-dh4zp It looks like when you point on an item, this line is trying to access the "Interactable" script on the item. But if you are pointing at something that is without this script - It will cause a NullReferenceException like you have. I don't remember at what point we changed the code but there should be an IF statement surrounding this line, and in that IF statement we check first, if the selectionTransform.GetComponent() is not null, only then run the code. It should be something like : var selectionTransform = hit.transform; InteractableObject interactable = selectionTransform.GetComponent(); if (interactable) // basically if its not null { interaction_text.text = interactable.GetItemName(); } this code should be here at some point in the tutorial. I just don't know where in the tutorial did you reach.
@Evelyn-dh4zp
@Evelyn-dh4zp Жыл бұрын
@@Mikes-Code But this shows up only when I point at the trees which have the interactable objects script and have the item name Tree I paused the video at 18:04 after you pointed at the trees and it worked for you but not for me despite me doing everything that you did in the video up to that point.
@Sus-jg2jt
@Sus-jg2jt Жыл бұрын
yes i am having the same problem when i look at the tree it just logs the game out
@mathgigue
@mathgigue 8 ай бұрын
am I the only one that the selection manager script doesn't work? It keeps giving me errors when I paste the script.
@leoneliws6595
@leoneliws6595 4 ай бұрын
Hello! Very good video, it helped me a lot, but I have a problem, and that is that when the rabbit stops walking and has to wait while still, instead of staying still, it continues walking but down ( -Y ) and then continues walking in one direction.
@MultiDegh
@MultiDegh 11 ай бұрын
hello Mike, great tutorial, I find myself stuck in the third tutorial,minute 9:04, i try to drag the script c# SelectionManager into the empty object of SelectionManager and the new Component is lacking one section that appears in your video, its called Reference to the object, this one doesnt appear in mine. I checked so many times the spelling and reset the scripts, erase them and made them again, restart the project and nothing, i tried all i can, will it still work without it?
@GaryParkin
@GaryParkin 11 ай бұрын
If you mean the Interaction _Info_UI where he drags the text over it's because the script doesn't compile. If the script doesn't compile, the little box that's attached to the variable public GameObject interaction_Info_UI doesn't show up. I had to comment out some of the code that refereed to the InteractableObject. Drag and drop the ui text then un-comment the text again. Hope this helps. I haven't got past 9:23 yet. (sleepy time) - Also use TextMeshPro not a plain text.
@lelufti
@lelufti Жыл бұрын
This Interaction Info UI its doesnt there in this Script :(
@Sansirusp
@Sansirusp Жыл бұрын
Same
@Warp_Speed_Studios
@Warp_Speed_Studios Жыл бұрын
same
@lelufti
@lelufti Жыл бұрын
@@Warp_Speed_Studios how i can fix that?
@Warp_Speed_Studios
@Warp_Speed_Studios Жыл бұрын
@@lelufti i think you create the InteractableObject C# script
@lelufti
@lelufti Жыл бұрын
@@Warp_Speed_Studios No! i make it 100% who Mike in his Video
@Recep-qb8eu
@Recep-qb8eu 5 ай бұрын
Thanx for amazing tutorial.But i have some problems.When i hit play my character look down at start.And rabbit starts walk and when it stops,it rotates 90 degress and goes idle with its head inside terrain.Then rabbit starts walking again and turns normal.When i hit play and look the game in scene window, my chracters cylender starts game 90 degrees rotated faced to ground, and the when the rabbit ends walking,it is also rotated 90 degrees.When i look inspector, both objects rotation values never change.
@momotytyyt
@momotytyyt 9 ай бұрын
Is it not way easier and scaleable to use layers to distinguish between interactable and non-interactable gameobject? you even used this approuch previously for detecting if the player is on the the ground. The physics methods even take in layermask object as params so i would asume this is the way to go no?
@Dazeza
@Dazeza 7 ай бұрын
Hi Mike, can you help me, if for the third person point of view the coding script part is the same as in the video or something has been changed and I direct it to the object, the writing doesn't appear like the one in the video because I use the third person point of view, is there a solution? Thank you
@hardy9810
@hardy9810 6 ай бұрын
Really great video! I just encountered a problem. The mouse sensitivity gets reeeeaaally fast every time, I look at my grass. I found out that this is because of the FPS. To solve this problem, you have to set the FPS to a amount, so it cant change. You can do it like this: (Paste this into start method) public int targetFrameRate = 60; // Set the target frame rate Application.targetFrameRate = targetFrameRate; // Set the fixed delta time to ensure consistent physics calculations Time.fixedDeltaTime = 1f / targetFrameRate;
@danyarsniper8793
@danyarsniper8793 8 ай бұрын
thanks , i have problem about rabbit , in inspector i don't have box cellinder and rigidbody , then in Hierarchy show 2 side box blue one side black
@CyberStudios
@CyberStudios 10 ай бұрын
My bunny keeps sinking about 15 less that the normal height and then it goes in the same height in which ever direction, floating bunny. I tried the rigidbody but that did not help much, any suggestions?
@alisherka3697
@alisherka3697 Жыл бұрын
Can you help me pls? My rabbit animation is not working. I tried to put them as in the video but still its not working
@user-gc5vo5sf7v
@user-gc5vo5sf7v 6 ай бұрын
Please help! The select manager is not working I’m using the old text. Thank you
@nickhermanns4368
@nickhermanns4368 3 ай бұрын
Anyone else get the error: The type or namespace name could not be found (are you missing a using directive or an assembly reference?) with the ? In the SelectionManager script?
@nickhermanns4368
@nickhermanns4368 3 ай бұрын
nvm, it didnt recognise the class because i didnt have the script for it yet. Fyi, get the InteractableObject script at the same time you get the SelectionManager script, then you won't get the error.
@AmbatukamOmaygot-bh6vd
@AmbatukamOmaygot-bh6vd 2 ай бұрын
@@nickhermanns4368 Thank you man i had the same issue
@fazrulnizamgmod6830
@fazrulnizamgmod6830 7 ай бұрын
Can somebody help me with the missing text when i point my cursor at a tree?
@Tix_Blox
@Tix_Blox Жыл бұрын
Assets\Scripts\SelectionManager.cs(28,73): error CS0246: The type or namespace name 'InteractableObject' could not be found (are you missing a using directive or an assembly reference?) how do i fix this??
@barrysrandomness
@barrysrandomness Жыл бұрын
Tix, you need to add a script for the InteractableObject. This isn't included in the description, but it is referenced in the video at 14:13.
@Tix_Blox
@Tix_Blox Жыл бұрын
@@barrysrandomness thank you for trying to help, but figured it out
@user-jy1lc3zz6o
@user-jy1lc3zz6o Жыл бұрын
@@Tix_Blox how?
@JnFunny
@JnFunny 3 ай бұрын
If the camera fails to find the target! Set the camera as tag main camera ! void Update() { Ray ray; if (Camera.main != null) { ray = Camera.main.ScreenPointToRay(Input.mousePosition); } else { Debug.LogError("Main camera is not found!"); // error log return; // code stop } RaycastHit hit; if (Physics.Raycast(ray, out hit)) { var selectionTransform = hit.transform; if (selectionTransform.GetComponent()) { interaction_text.text = selectionTransform.GetComponent().GetItemName(); Interaction_info_UI.SetActive(true); } else { Interaction_info_UI.SetActive(false); } } } }
@George-uv7wt
@George-uv7wt Ай бұрын
Tysm
@007_man
@007_man 4 ай бұрын
We can also limit the distance for ray
@micmalawi
@micmalawi Жыл бұрын
Can't get the public GameObject to show in the inspector.
@LirusNeon
@LirusNeon 3 ай бұрын
My rabbits flips after run animation and starts floating if colides with another colider :P
@FIHBANKORT
@FIHBANKORT Ай бұрын
when i place crosshair, ITS PIXELIZED AND LOOKS TERRIBLE, even the unity presets looks horibly pixelized, i tried big resolution images, small, different formats, all the canvas settings, image settings in unity, nothing changes the pixalized terrible look of my crosshair white center dot... I am already trying to fix it for 2 hours and i cant figure out whats the problem..........
@FIHBANKORT
@FIHBANKORT Ай бұрын
but if i use text: + ("plus"), it looks normal
@FIHBANKORT
@FIHBANKORT Ай бұрын
nope EVEN THE TEXT IS PIXELIZED......
@saswatabhattacharjee7121
@saswatabhattacharjee7121 10 ай бұрын
my rabbit prefabs are clipping inside the terrain any solutions? @Mike's Code
@orico2007
@orico2007 Жыл бұрын
Can I make an rotation animation because it just teleports to the other way
@lucaselkinson3591
@lucaselkinson3591 5 ай бұрын
Any fix for some sort of lag spike or frame rate drop when hovering over game objects?
@idk-watermelon
@idk-watermelon 4 ай бұрын
I’m getting the error (interactableObject could not be found (are you missing a using directive or an assembly reference?)) any help?
@varindertung4591
@varindertung4591 2 ай бұрын
make sure your InteractableObject script name is same as you used in the Selection Manager Script
@altoratixxxxx1082
@altoratixxxxx1082 5 ай бұрын
interaction info ui not found
@Mr.Auberpunt
@Mr.Auberpunt Жыл бұрын
hi i want some help i have this problim in selection manger { NullReferenceException: Object reference not set to an instance of an object SelectionManager.Update () (at Assets/Surivival/UI/scripts/SelectionManager.cs:1 } this is code 18 Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); can any one help pleas
@matteolotti2139
@matteolotti2139 8 ай бұрын
Me too
@Fortkitty
@Fortkitty Жыл бұрын
[SOLUTION IN REPLY] Getting an object reference nullreference exception error: NullReferenceException: Object reference not set to an instance of an object SelectionManager.Update () (at Assets/Scripts/SelectionManager.cs:19) this is line 19: Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); pls help
@Fortkitty
@Fortkitty Жыл бұрын
Hey for anyone else having this issue I fixed it! It was because I deleted my main camera, to fix this make a new camera and then set the tag to MainCamera in inspector!
@obiwancanosi
@obiwancanosi Жыл бұрын
@@Fortkitty Should I rename my main camera to MainCamera ? I dont understand it would you help me ?
@obiwancanosi
@obiwancanosi Жыл бұрын
I found it thx, it means a lot to me :)
@notgager7290
@notgager7290 10 ай бұрын
thanks man, been pulling my hair out for fucking hours over this lol
@rrrzzz7801
@rrrzzz7801 10 ай бұрын
@@Fortkittythank u!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@Matthew-Liu09
@Matthew-Liu09 9 ай бұрын
when they stop they hit their head and they fall and sometimes they are floating
@arkerirulat
@arkerirulat 7 ай бұрын
Box collider very big.
@memesaber2093
@memesaber2093 Жыл бұрын
Hi Ik this is an old video but I can’t seem to get rid of the error (10,5) The type or namespace ‘Text’ could not be found
@jordanriver6346
@jordanriver6346 Жыл бұрын
Are you using TextMeshPro?
@xdiggidystaticx1596
@xdiggidystaticx1596 Жыл бұрын
Amazing tutorials first of all! I have one small problem so far. My Rabbit moves and all that good stuff but wont HOP! driving me crazy! Anyone else?
@xdiggidystaticx1596
@xdiggidystaticx1596 Жыл бұрын
I fixed it the Hopping!
@RatSpit
@RatSpit 10 ай бұрын
@@xdiggidystaticx1596 How, I am having the same problem?
@TechGamerzv2
@TechGamerzv2 Жыл бұрын
error CS0246: The type or namespace name 'Text' could not be found (are you missing a using directive or an assembly reference?) How to Fix Help me
@Mikes-Code
@Mikes-Code Жыл бұрын
You simply need to add the UI namespace. Hover over the Text, click on "show potential fixes", and then click on "using UnityEngine.UI". or simply add "using UnityEngine.UI" at the top of the script
@Obliterator786
@Obliterator786 10 ай бұрын
Bro i was facing the same same problem but here is solution it worked for me it is updated script for TextMeshPro Unity Version using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; public class SelectionManager : MonoBehaviour { private TextMeshProUGUI textMeshPro; public GameObject interaction_Info_UI; TextMeshProUGUI interaction_text; private void Start() { textMeshPro = GetComponent(); interaction_text = interaction_Info_UI.GetComponent(); } void Update() { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit hit; if (Physics.Raycast(ray, out hit)) { var selectionTransform = hit.transform; if (selectionTransform.GetComponent()) { interaction_text.text = selectionTransform.GetComponent().GetItemName(); interaction_Info_UI.SetActive(true); } else { interaction_Info_UI.SetActive(false); } } } }
@1984skey
@1984skey Жыл бұрын
Why you use so much code for the direction of the AI. Simple use "transform.localRotation = Quaternion.Euler(0f, WalkDirection*90f, 0f); transform.position += transform.forward * moveSpeed * Time.deltaTime;" instead of using all the switch/case arguments. I'm just a beginner but 4 times the same Code segment isn't looking good for myself.
@1984skey
@1984skey Жыл бұрын
Instead of "WalkDirection*90f" I added a variable "int WalkSteps = 4" [0-360] and change it to "WalkDirection * (360 / WalkSteps)" and in the function "ChooseDirection()" "WalkDirection = Random.Range(0, WalkSteps);" So the user/programmer can choose an angle between 0-360 degree for the next direction
@TechGamerzv2
@TechGamerzv2 Жыл бұрын
bro getting error at text line no 7
@ZenGaming6000
@ZenGaming6000 Жыл бұрын
hi im getting this error with selection manager can anyone help please? Assets\Scripts\SelectionManager.cs(6,33): error CS0246: The type or namespace name 'MonoBehaviour' could not be found (are you missing a using directive or an assembly reference?)
@tenzindayoe5783
@tenzindayoe5783 Жыл бұрын
It seems like you are not importing unity engine in your code. Add this on the beginning of the SelectionManager.cs : Using UnityEngine;
@Obliterator786
@Obliterator786 10 ай бұрын
Here is updated script using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; public class SelectionManager : MonoBehaviour { private TextMeshProUGUI textMeshPro; public GameObject interaction_Info_UI; TextMeshProUGUI interaction_text; private void Start() { textMeshPro = GetComponent(); interaction_text = interaction_Info_UI.GetComponent(); } void Update() { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit hit; if (Physics.Raycast(ray, out hit)) { var selectionTransform = hit.transform; if (selectionTransform.GetComponent()) { interaction_text.text = selectionTransform.GetComponent().GetItemName(); interaction_Info_UI.SetActive(true); } else { interaction_Info_UI.SetActive(false); } } } }
@TheCoolPersons
@TheCoolPersons 10 ай бұрын
How did you get art, then ui art, then sphere? They weren't there for me, and I created art and then ui art in that, but how do i get the sphere? Also wondering how you had the rabbits in the hierarchy area
@Obliterator786
@Obliterator786 10 ай бұрын
Bro you are using different unity version i think
@v_xx_official
@v_xx_official 10 ай бұрын
it because he made those folders him self
@dimitarnikolov9570
@dimitarnikolov9570 11 ай бұрын
l really need help when l klick right butten and go to "UI" l dont have "text" can someone tell me why
@Obliterator786
@Obliterator786 10 ай бұрын
Bro because we are using different unity version there is textMeshPro if you want script for textMeshPro i can provide you ❤
@Obliterator786
@Obliterator786 10 ай бұрын
Here is updated script using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; public class SelectionManager : MonoBehaviour { private TextMeshProUGUI textMeshPro; public GameObject interaction_Info_UI; TextMeshProUGUI interaction_text; private void Start() { textMeshPro = GetComponent(); interaction_text = interaction_Info_UI.GetComponent(); } void Update() { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit hit; if (Physics.Raycast(ray, out hit)) { var selectionTransform = hit.transform; if (selectionTransform.GetComponent()) { interaction_text.text = selectionTransform.GetComponent().GetItemName(); interaction_Info_UI.SetActive(true); } else { interaction_Info_UI.SetActive(false); } } } }
@GeetMusic06
@GeetMusic06 9 ай бұрын
hello there i am having a problem in the SelectionManager Script Firstly the pastebin link isnt working secondly when you drag the interaction_info_UI script to selection manager i am only able to see 1 option which is 'script' where altho we cant edit it but as in your video i am not able to see the refrence section where i can drag the interaction_info_UI. i tried many times tried typing the scrpit by myself, coping scripts from comments, using TextMeshProGUI,new project everything but i am stuck there hope you understand the problem and help me out!!
@Mikes-Code
@Mikes-Code 9 ай бұрын
Well the pastbin link is working, I just tried it right now. Try opening it with another browser, maybe some browsers block the website or something. About the missiong option in the inspector, make sure that all properties are "public" and not "private" this will make them visible in the inspector. Following the tutorial should give the same results, but it's easy to miss something that can mess things up.
@GeetMusic06
@GeetMusic06 9 ай бұрын
@@Mikes-Codethanks you so much mike sir, if will comment again on your video if anything is needed thank you for your help
@Sir_doughnut
@Sir_doughnut 6 ай бұрын
Hi Mike, I have a question for the selection manager script because it says “the type or namespace“interaction-able object” could not be found” pls help
@robertorodriguez4304
@robertorodriguez4304 6 ай бұрын
You need the InteractableObject Script to be "at least" in your Project folder for the selection manager to detect it and eventually attached to an object as a component for it to display the name. The code is on the description of the video.
@ETAFree
@ETAFree Ай бұрын
@@robertorodriguez4304 Thank you for your enthusiasm, bro. It saves my day.
@richardlonigro4178
@richardlonigro4178 10 ай бұрын
Great tutorial! My bunny appears for a split second when I first play my game, and then immediately disappears! I'm not sure what I'm doing wrong hah.
@richardlonigro4178
@richardlonigro4178 10 ай бұрын
I figured it out. My rabbit was falling through the world. Once I spawned the rabbit a bit higher above the terrain, it was there bouncing around being cute :D
@swatioswal6249
@swatioswal6249 3 ай бұрын
Can anyone please write me the whole code of intractable objects
@ETAFree
@ETAFree Ай бұрын
link at desription
@joecraft9098
@joecraft9098 Жыл бұрын
Bit of help here- Assets\Scripts\SelectionManager.cs(9,5): error CS0246: The type or namespace name 'Text' could not be found (are you missing a using directive or an assembly reference?)
@sethluca
@sethluca Жыл бұрын
change all Text references to TextMeshProUGUI
@mikeyororke9114
@mikeyororke9114 Жыл бұрын
@@sethluca that’s not working anything else I can try
@user-zh2dl4vw9k
@user-zh2dl4vw9k Жыл бұрын
@@mikeyororke9114 add: using UnityEngine.UI; to the top of the selection manager script
@allugames8958
@allugames8958 6 ай бұрын
It all works after i got a bunch of errors and tried again but my fps got 6 times worse
@allugames8958
@allugames8958 6 ай бұрын
nevermind. i resetted the game and it started workin again
@cyber010
@cyber010 7 ай бұрын
How to fix my namespace could not be found
@Mikes-Code
@Mikes-Code 7 ай бұрын
Just add these onces at rhe very to of the script (even outside of the class): using System.Collections; using System.Collections.Generic; using UnityEngine; If it's a different one, just find the error (red mark), hover it and click on "fix errors". Then it will give you options for the namespace you need.
@mr.gamersystemthundergod3012
@mr.gamersystemthundergod3012 4 ай бұрын
Hello, Can you make a story dialogue tutorial? I hope you consider it since I need it for my capstone project.
@smokinjoe9415
@smokinjoe9415 4 ай бұрын
Pay him a couple thousand or do it yourself, nobody is going to do your work son.
@mr.gamersystemthundergod3012
@mr.gamersystemthundergod3012 4 ай бұрын
@@smokinjoe9415 did I do something to offend you? I'm not talking to you idiot. unless the owner of this video/tutorial decides it to my comment, not you. If he rejects it that's fine with me.
@luxrose
@luxrose 4 ай бұрын
Instead of this, using navmesh was easier for me for the animal AI.
3D Survival Game Tutorial | Unity | Part 4: Picking Up Items
36:38
Making a Game with Java with No Experience
8:41
Goodgis
Рет қаралды 206 М.
Why Is He Unhappy…?
00:26
Alan Chikin Chow
Рет қаралды 110 МЛН
Чёрная ДЫРА 🕳️ | WICSUR #shorts
00:49
Бискас
Рет қаралды 4,8 МЛН
Comfortable 🤣 #comedy #funny
00:34
Micky Makeover
Рет қаралды 17 МЛН
ОБЯЗАТЕЛЬНО СОВЕРШАЙТЕ ДОБРО!❤❤❤
00:45
I made an EVEN BETTER Minecraft
12:30
SimonDev
Рет қаралды 325 М.
They made a game about philosophy...
23:19
Real Civil Engineer
Рет қаралды 442 М.
1 Year MAKING an OPEN-WORLD game
8:23
AIA
Рет қаралды 746 М.
3 Hours vs. 3 Years of Blender
17:44
Isto Inc.
Рет қаралды 4,5 МЛН
Can I make an OPEN WORLD Game in ONE WEEK?
12:43
Code Monkey
Рет қаралды 72 М.
A new way to generate worlds (stitched WFC)
10:51
Watt Designs
Рет қаралды 524 М.
When Your Game Is Bad But Your Optimisation Is Genius
8:52
Vercidium
Рет қаралды 1,5 МЛН
JPEG is Dying - And that's a bad thing
8:09
2kliksphilip
Рет қаралды 563 М.
Why Is He Unhappy…?
00:26
Alan Chikin Chow
Рет қаралды 110 МЛН