For anyone having the same problem as I had, I believe that it is bcs of a newer version of Unity or maybe the material itself, but if you try the fadeIn action and can't try changing the name of the material you are calling from "_Color" to "_BaseColor"
@BossKing1243 Жыл бұрын
Yeooo that works! Thanks bro
@wenli407011 ай бұрын
You're a genius! Thank you!!
@sardarshahrukh568211 ай бұрын
This comment should be pinned Great!
@lucutes29367 ай бұрын
What
@aliasd54233 жыл бұрын
Exactly what I needed when I needed it, suggestion, I used post processing volumes for my fading instead of a quad, and it's much nicer because you can add stuff like zoom and bloom
@criskywalker172 жыл бұрын
Nice one! How can it be done? Because this way I get my grab and teleportation rays too buggy
@benemy96 ай бұрын
The FaderScreen seems to not only block ray interactors, but also the UI canvas. As a quick fix for this, I modified the SceneTransitionManager to set the FadeScreen GameObject to be active only during the fade, and inactive otherwise: public class SceneTransitionManager : MonoBehaviour { public FadeScreen fadeScreen; private void Start() { StartScene(); } private void StartScene() { StartCoroutine(StartSceneRoutine()); } private IEnumerator StartSceneRoutine() { fadeScreen.gameObject.SetActive(true); fadeScreen.FadeIn(); yield return new WaitForSeconds(fadeScreen.fadeDuration); // set FadeScreen to inactive, to prevent blocking ray interactors and UI canvas fadeScreen.gameObject.SetActive(false); } public void GoToScene(int sceneIndex) { StartCoroutine(GoToSceneRoutine(sceneIndex)); } private IEnumerator GoToSceneRoutine(int sceneIndex) { fadeScreen.gameObject.SetActive(true); fadeScreen.FadeOut(); yield return new WaitForSeconds(fadeScreen.fadeDuration); SceneManager.LoadScene(sceneIndex); } }
@sankgoku2 ай бұрын
Thanks @benemy9
@TheARTofMining Жыл бұрын
Thanks for the video. Note one thing this makes the controller rays dissapear (laser pointers). Possibly best way is to disable the fader quad all together and then enable it only when required. I believe the XR rig its fighting/blocking the laser pointer rendering. I think its becasue the shader you provided does not compensate for the render queue but my knowledge is limited on shaders. This is on Standard Render Pipeline. I did try scaling the quad to .1 and changing material render queue to no avail.
@drruka8503 жыл бұрын
Yes, thank you so much! You have no idea how long I have been thinking about this. Can't wait to try this out in my game this weekend.
@ValemTutorials3 жыл бұрын
Nice let me know how it works ! :D
@cedricknapp28893 жыл бұрын
Merry Christmas, thanks for the great tutorial!
@CaseyBoller2 жыл бұрын
You should really make an announcement video on main, as a long time viewer (and patreon sub, though I hadn't checked in a while) I had no idea this channel existed! Great video as always :)
@ValemTutorials2 жыл бұрын
Thats a good point Casey thank you ! I'll make a new video announcing the new channel soon
@wenli407011 ай бұрын
Thanks for the detailed tutorial, learnt a lot!
@michaorzechowski49483 жыл бұрын
Merry Christmas!
@usernotfound6407 Жыл бұрын
dude i searched your channel for 20 minutes, just to show someone how fucking beautiful Belgian accent is
@kooky744 ай бұрын
Hello (on va parler en anglais vue que c'est la langue de cette chaine 😅). The second method is THE approach to deal with if you have a big scene yes! Thx for the video you have made big progress since the begining of your videos
@genofelice60342 жыл бұрын
Thanks. I have been looking for a way to fade XR scenes for a while. This seems to be the answer. Fade out works great but, for some reason, fade in happens in a flash no matter what duration I set.
@Andrew-lo2lk Жыл бұрын
This happens to me too, fade in keeps flashing :(
@zillieness2 жыл бұрын
Thank you so very much for these tutorials. They are extremely helpful and still work a year later!
@moritzfriedrich Жыл бұрын
You are brilliant. Thanks so much!
@sl49272 жыл бұрын
Thank you for the tutorial and especially for the very didactic approach
@ScareFire3 жыл бұрын
Nice tutorial !
@CactusVRstudios3 жыл бұрын
Good one. I'll use some of this for the next Cactus Cowboy VR game. It's much less complex than the spaghetti code I did for my fader. Note for others; You also use this quite easily as a damage vignette / indicator.
@dantheman38259 ай бұрын
CACTUS I NEED YOUR TIPS ON HOW TO MAKE AN INDE GAME AS GREAT AS YOURS
@Tester13565 Жыл бұрын
always thank you
@serpnta12673 жыл бұрын
Great tutorial! Thank you.
@ChuckiBinner6 ай бұрын
Fantastic! Great video, very helpful, thank you🤟
@silwer2223 жыл бұрын
Merry Christmas! Great tutorial as always. Fade mechanism is very useful in VR. I am currently trying to prevent user from looking through the walls. Not sure how to do it, but I'll probably need to use some kind of collider attached to user's camera. The fading mechanism will also be usefull, I can block user's vision when he tries to pass through the wall :D
@samsil1872 жыл бұрын
I was thinking the same thing. Whats to stop the player from cutting through other objects? I think setting the render on the fade object really high would work. Did you find a solution?
@ibro6774 ай бұрын
Can u please make a video on that topic but with a loading screen in it.
@MsGul2 жыл бұрын
Thank you so much!
3 жыл бұрын
You are already making me work on holidays! Painful but great! :-)
@davidson41012 жыл бұрын
I'm a big fan of yours I always wanted to have a vr glasses to play but I don't have a stove how to make a homemade game for glasses made of cardboard
@baluuvids2 ай бұрын
Awesome video! How do you keep the headset on while its off your head? Would be very useful while working!
@TurkiKAlqou2 жыл бұрын
It's messing with my ray interactor help
@kingbrodan2 жыл бұрын
Great video! Would love to see a save and load function that works in VR, having a hard time understanding how to save and load position and rotation or even variables when transitioning scenes instead of having to restart the whole scene.
@esrivera22287 ай бұрын
Thaks for your help
@silentshadow892 жыл бұрын
Hi bro, nice work, why doesn't Visual Studio recognize the 'Color' and 'Renderer' parameters, what library or resource do I need to have installed for it to work? I'm trying to develop something in VR and I have installed everything I need in theory, but I don't know what happen.
@billybobthe9thjr786 Жыл бұрын
same here mate
@tctopcat19812 жыл бұрын
wow great tut.
@krestenkuzkuz2 жыл бұрын
Any idea of how to just make the scene black for a specific duration? I tried with nested while loops and three alphas, didn't work....
@ValemTutorials2 жыл бұрын
after fading you can wait a bit before un fading by doing : yield return new WaitForSeconds ( and give it the number of second you want to wait
@neilfosteronly2 жыл бұрын
Was trying to do this for a few days. Thanks. The FadeIn() was going a little fast for me so I added this code to update and added a public float. This adds a time the screen is all black before transition. Took off FadeIn() on Start. public float timerFadeIn = 2f; void Update() { StartFadeIn(); } void StartFadeIn() { timerFadeIn -= Time.deltaTime; if (fadeOnStart && timerFadeIn
@REC_crazy Жыл бұрын
Hey, can you help? I want to make it an on collision script so that whenever I touch it the scene changes
@moxx Жыл бұрын
Thank you so much for the tutorial!! I would like to ask how to make the Box Collider with a trigger to work with this Scene Transition Manager script? I want to create that a character touches a portal and transits to another scene. it would be great to add an additional tutorial about scene change with different interactions involved! millions thanks again!!
@ValemTutorials Жыл бұрын
Create a box collider, set it to is trigger = true, create a script attached to the box collider with OnTriggerEnter, And if the collider entering the box collider is the one on the hand of the player you can simply call the GoToScene function to transition to a new scen. :)
@moxx Жыл бұрын
@@ValemTutorials thank you so much for your reply! I figured it out finally!
@frankyredente41528 ай бұрын
@ValemTutorials thank you this is great. I have implemented this method in my VR game, the fade in and and out works great. The Async of the scene is not working. I still get a little freeze hang time after one scene fades out and before the fade in on the next scene starts. Do you think you could help me to understand why? I get no errors so I am not sure what's going on. But it seems that there is no Async loading while the fade out is happening. The Async method is exactly has you done it in the video - and is implemented correctly in the UI buttons. Thank you
@pratyasha4849 Жыл бұрын
the button is not clickable in VR, how can we solve this problem
@sudhakarkumar20805 ай бұрын
I am using OVR Rig and Ray Interactor SDK for UI when i created Screen Fader by following you, the ray interactor is not accessing UI elements, How can i fix this problem.
@cherrycoked3 Жыл бұрын
Hello, amazing video. How can I make it that instead of when they click the button, it is when they touch an item that they get automatically transported?
@imanniom Жыл бұрын
you can use the OnTriggerEnter in another script that can detect whether the user have toch the object or not. the use the method inside OnTriggerEnter to use in the logic valem explained for scene transition.
@willworkforfood9102 Жыл бұрын
Great video, thank you. How can I activate the transition manager script when entering a collider? I would like to use this to load the next scene when the player reaches the end of the level just by reaching an end zone/collider.
@willworkforfood9102 Жыл бұрын
Managed to figure it out. Simple cube for the restart zone, disabled the mesh rendered and added a triggered collider and rigidbody. Then just add a XR simple intractable and drop the Transition manager on one of the entered events.
@elenix40822 жыл бұрын
Thanks for the tutorial bud! its amazing. by the way, is there any way to fix the controller material? if I change it to different material, it will not change the valid and invalid color gradient anymore. Like in your video, it will always stay black line
@luiginicastro11012 жыл бұрын
I am currently facing this as well :/
@elenix40822 жыл бұрын
@@luiginicastro1101 i changed my method. instead of using quad, i use world space canvas with image just for this fading transition
@luiginicastro11012 жыл бұрын
@@elenix4082 Interesting. I just changed my script so that when my Fade is done, the Fader gameobject turns off which shows my raycast and when I go to load a level it turns it back on which keeps everything working. I think I like your solution more haha
@elenix40822 жыл бұрын
@@luiginicastro1101 your method is good too. Looks like we programmer can survive this problem challenge in different way x'D
@zillieness2 жыл бұрын
@@elenix4082 @Luigi Nicastro Thank you for saying this! We are using BOTH of these fixes. Changing the quad to a world space UI canvas and UI image (attached to the Main Camera) was not enough to fix the controller material issue. But I think this method actually looks better than the quad, because it seems to fix slight shadows on the fader when you move your view around. Disabling the UI image after the fader transitions did fix the controller material issue.
@bhanupatil6034 Жыл бұрын
Hi I am facing an issue with this fader screen my UI rays don't appear while this fader layer is on but teleportation ray works. any idea why this must be happening ?
@TkMe2Mrz Жыл бұрын
I have the same issue. Would love a solution.
@TheARTofMining Жыл бұрын
@@TkMe2Mrz Possibly best way is to disable the fader quad all together and then enable it only when required. I believe the XR rig its fighting/blocking the laser pointer rendering. I think its beacsue the sahder provided does not compensate for the render queue but my knowledge is limited on shaders.
@hate74862 жыл бұрын
Great Tutorial! Is there any possibility to keep the XR interactor Line Visual?
@A_walk_in_the_park Жыл бұрын
Hello Valem, awesome tutorial as always. Even though the scene loading is done asynchronously, there is usually still the default hourglass icon from oculus appearing and the music still freezes on the transition. How could this be resolved?
@fatamatojjohora375510 ай бұрын
hi i am totally beginner,i am looking for that but i need to do that from beginning how to put cube button scene .is it a one video or its has other series as well
@jamesprise42522 жыл бұрын
any help on how to fade in to one scene, wait 30 seconds, then fade to the next???
@jackward5944 Жыл бұрын
Hey great tutorial! Is there a way to prevent really bad lag and stuttering when the quad is infront of the camera? The fade works great but as soon as the quad has faded out looking around my scene becomes incredibly jarring. Any help would be greatly appreciated. Thanks
@ValemTutorials Жыл бұрын
Thats weird that it makes your game lag :o maybe try to disable the quad completely after the fading?
@jackward5944 Жыл бұрын
@@ValemTutorials Thank you for your response! I'll try that. What would the easiest way to implement it be do you reckon? As i'd need to have it reactivated for when the user would want to switch back to the original scene. Thank you again for your repsonse
@rylee52332 жыл бұрын
would you mind if I ask a question? I can not public FadeScreen fadeScreen; it seems like if I just define this I got a error" The type or namespace name 'fadeScreen' could not be found".How can I make it work?
@neilfosteronly2 жыл бұрын
The public FadeScreen is the name of the first script he made. Check if you made the current name.
@fernandocgi38742 жыл бұрын
Awesome thanks alot! But when i change the scenes, the loaded one gets laggy any idea how to fix it? before used to run smoothly
@fernandocgi38742 жыл бұрын
Nvm it runs smoothly when its build into the oculus. Only on the editor it gets laggy
@Andrew-lo2lk Жыл бұрын
I'm having a problem where if you call the FadeIn in another script it'll reach 50% opacity but then flicker and reset to 100% opacity, the fade in plane is not too close to camera! I see someone else a few months ago was having the same problem :(
@johnkarl31432 жыл бұрын
Any idea as too why my Ui elements show through the quad? (text and images can been seen through the quad when the renderer is set to 1?) Not too bad as it me made look into fading my Ui which has give me more control over the looks of my game.
@chikodarkzcaguaii3 жыл бұрын
oh shit, this is good
@endgamedevs2 жыл бұрын
What about when the scene is not empty and the game chuggs even with this solution? How would you control or prevent player from fading too soon, due to awake and start functions? We have tried delaying the fade out a few seconds after and it would still chugg.
@zackng95442 жыл бұрын
Hi Valem and everyone here, I got my view blinking after adding the Fader Screen and my ray interactor line no longer active. Can you help explain what's the problem?
@neilfosteronly2 жыл бұрын
Your fader screen is probably to close to your camera for the blinking. Maybe you kept on the mesh collider blocking ray interactor line.
@adhochero66193 жыл бұрын
im going to guess how you do it before I watch. you change the alpha of a plane in front of the camera and switch scenes when its opaque then fade it back to transparent.
@ValemTutorials3 жыл бұрын
Good guess! :]
@adhochero66193 жыл бұрын
@@ValemTutorials its how I would have done it
@davidson41012 жыл бұрын
make a tutorial on how to make a game for cardboard vr glasses
@billybobthe9thjr786 Жыл бұрын
u can't the cardboard glasses dont have any way to detect inputs and other stuff, they are just a phone in cardboard