Wishlist my new game BUMBI on Steam! store.steampowered.com/app/2862470/BUMBI/
@unity2 жыл бұрын
So grateful for all your work!❤
@samyam2 жыл бұрын
❤❤❤
@emmet3690 Жыл бұрын
Great video and great series, if anyone is having trouble with their prefabs being placed halfway through the detected planes, try parenting your prefab to an empty, then 0 out all the transforms on both your prefab and empty, then adjust the y position of your prefab so that it rests above the ground grid. Hope this helps :)
@Sohneg3 ай бұрын
Mine does not spawn at all :/
@WalrusesAreTheOne11 ай бұрын
Hi Samyam, I know you're done with Unity, but if I can just ask you a question it would really help me a lot. So, I understand tap and place, but what do you do if you just want your object to spawn automatically, right after the surface is detected? What steps do I take or omit, because every tutorial is about tap and place, and nothing on just detect and spawn without tapping. Thanks!
@michelesandroni Жыл бұрын
Great tutorial! I'm using the same technique but instead of instantiating a Prefab, I'm setting the transform of a single GameObject that already lies in the scene and turning on and off its meshrenderers because it has animations and other interactive functionality that needs to persist during the session. I have two questions: 1) I've seen other tutorials that use anchors. Do they offer any advantage over simply placing the object at the hit.pose with a plane? 2) How can I restart the AR experience? reloading the same scene using the SceneManager throws a bunch of errors. I've tried also using arSession.Reset(); LoaderUtility.Deinitialize(); SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex, LoadSceneMode.Single); LoaderUtility.Initialize(); but it still does not work.
@chriswatts36972 жыл бұрын
very nice - thats what we like :)
@badscotsman2 жыл бұрын
Using the IDEs refactoring tools will generate the method signatures for you, so you don't have to type it out with all the required parameters (ex., FingerDown). This would save time and eliminate typing mistakes. Unfortunately, VS Code has very little to offer for C# refactoring extensions. :(
@shmall_potato4 ай бұрын
Hi Samyam, I'm new to this unity ..my friend and I have a project to make mapping in our campus..watched tutorial but it's the old version of unity so it's little complicated for me to know whether 3D project is more okay or AR project is more okay...which one should I choose 😢
@eunsoolee4855 Жыл бұрын
I got error 'Meshing is not supported on this device' I think it doesn't support Android
@HilaryTsaiRageVlog11 ай бұрын
I copied your code exactly, but my object keeps spawning infinitely, and only in one place despite my tapping elsewhere. Any clue what may be going on?
@Paruthi.618 Жыл бұрын
thank you for this tutorial.. When tried in android the plane detected is keep on shaking.. and also on moving camera, the plane moves and offsets from the real world floor plane.. now both plane and prefab placed is in air at height of two feets.. is this ar core issue ?
@ChristopherRozarioiceboul Жыл бұрын
your really smart, where did you learn all this
@christianb.4637 Жыл бұрын
Is there any way to test that in the simulation-mode of the editor with mouse clicks? The touch is recognized when i click but ARRaycastManager.Raycast never hits anything. When i test it on my android phone it works though. It is so tedious to test everything on the phone.
@ramkishorreddy3686 Жыл бұрын
Hi , do we need Arcore for building/ view AR apps in Android??? Can we do without ARcore??
@vindereynetis39857 ай бұрын
how to set random color on each new object?
@azinshafiyan9829 Жыл бұрын
I tried it for my AR project, on iOS everything works just fine but on Android it doesn't work. What would be the problem?
@PavusthePug Жыл бұрын
Hey, I keep getting an error stating "InvalidOperationException: EnhancedTouch API is not enabled; call EnhancedTouchSupport.Enable()" I have Input system installed and my code compiles with no errors. This error happens on runtime. Any help on this would be much appreciated!
@samyam Жыл бұрын
You are supposed to call that Enable function before using the EnhancedTouchSupport as it suggests, else the input will not register. Call it in the OnEnable function
@einnerlink Жыл бұрын
Sorry @@samyam but I'm getting the same error and I don't get what you mean.
@AliAhmed-wc2bi11 ай бұрын
In onEnable put it before onFingerDown subscribe but in OnDisable put it after onFingerDown subscribe
@pratikmane566 Жыл бұрын
I'm getting black screen as soon as I tap on the screen to place an object. Any solution?
@MrWhatthemonkey Жыл бұрын
What vscode extensions / linting are you using! I wish my IDE would be as helpful as yours looks.
@samyam Жыл бұрын
I share them here! kzbin.info/www/bejne/aXi5eKylpL9roM0
@igorprado5909 Жыл бұрын
i know it's a random question but what is the switch on your keyboard? it sounds so satisfying!
@sahilc358 Жыл бұрын
mechanical keyboard
@sorenmuller1974 Жыл бұрын
Very nice and well explained 🙂. I have one odd problem.. If i run it on Android it works perfect, but on ios the alignment on first placed is good, but the rest gets the same orientation as the first one, eventhough it should be aligned towards you every time.. IOS feaure ?!?!
@ngsoohao3624 Жыл бұрын
Which version of unity is this?
@switchRetroo6 ай бұрын
How to make AR sticker using unity please
@williamlee9374 Жыл бұрын
When I added a button, both the button and the place object are both called when touched. What would I do to only have the button be registered?
@samyam Жыл бұрын
You can check if the tap is over a gameobject using IsPointerOverGameObject docs.unity3d.com/2018.2/Documentation/ScriptReference/EventSystems.EventSystem.IsPointerOverGameObject.html
@williamlee9374 Жыл бұрын
@@samyam Thank you so much for the reply! Did you put IsPointerOverGameObject inside the FingerDown function or in the Update function like the documentation says. I tried putting an If(!EventSystem.current.IsPointerOverGameObject(Input.GetTouch(0).fingerId)) outside the foreach loop and it still registered the tap on the overworld.
@nickdunn9090 Жыл бұрын
Hi, just signed up to your Patreon. Do you have a script that places the object just once in the scene ??
@samyam Жыл бұрын
Thanks for subscribing! You can write a simple boolean that turns true once you’ve clicked the first time, and then check that boolean later on, or deactivate the script entirely to prevent unnecessary checking.
@blobcat6237 Жыл бұрын
@@samyamcan you put a detailed tutorial for that?
@a7mdbest15 Жыл бұрын
Hi samyam, im learning from you so thanks so much for your effort. I tried to do the placement on tapping, but it didnt work for me for some reason 😭. I can see the plane but no objects are spawning when i click. I wonder what am i missing
@samyam Жыл бұрын
If you have AR Foundation you can check the inspector/console (debug log) and see if the object is being spawned. It might be several things, so make sure to step through each statement and check if it’s getting executed correctly. We also have a Discord in the description where you can ask for help.
Hi, I'd like to instantiate a number of prefab randomly inside the surface of the ARPlane I clicked on. I tried it that way: private void InstantiateTarget(ARPlane plane) { Transform planeTransform = plane.gameObject.transform; Bounds planeBounds = plane.gameObject.GetComponent().mesh.bounds; for (int i = 0; i < _numberTarget; i++) { Vector3 position = GetRandomPosition(planeBounds, planeTransform); Instantiate(_prefab, position, Quaternion.identity); } } private Vector3 GetRandomPosition(Bounds planeBounds, Transform planeTransform) { float minX = planeTransform.position.x - planeTransform.localScale.x * planeBounds.size.x * 0.5f; float minZ = planeTransform.position.z - planeTransform.localScale.z * planeBounds.size.z * 0.5f; return new Vector3(Random.Range(minX, -minX), planeTransform.position.y, Random.Range(minZ, -minZ)); } But it doesn't work, how can I do it?