I updated it for those who wants to add a secondary camera for this (its using new Input system): using UnityEngine; using System.Collections; public class ScreenShotUsingCamera : MonoBehaviour { private Texture2D screenCapture; private bool isCapturing = false; // To prevent multiple captures at once [SerializeField] private UImanager _uiManager; [SerializeField] private Camera screenshotCamera; // Camera to take the screenshot from private RenderTexture renderTexture; // RenderTexture to capture the camera's view private void Start() { // Create a RenderTexture to hold the screenshot renderTexture = new RenderTexture(Screen.width, Screen.height, 24); screenCapture = new Texture2D(renderTexture.width, renderTexture.height, TextureFormat.RGBA32, false); } private void OnEnable() { InputHandler.OnScreenshot += Capture; // Subscribe to the screenshot event } private void OnDisable() { InputHandler.OnScreenshot -= Capture; // Unsubscribe from the screenshot event } public void Capture() { if (!isCapturing) { StartCoroutine(CaptureScreen()); } else { Debug.Log("IsCapturing"); } } private IEnumerator CaptureScreen() { isCapturing = true; // Set the camera's target texture to the RenderTexture screenshotCamera.targetTexture = renderTexture; screenshotCamera.Render(); // Set the active RenderTexture to the one we just created RenderTexture.active = renderTexture; // Read the pixels from the RenderTexture screenCapture.ReadPixels(new Rect(0, 0, renderTexture.width, renderTexture.height), 0, 0); screenCapture.Apply(); // Clean up screenshotCamera.targetTexture = null; RenderTexture.active = null; ShowPhoto(); isCapturing = false; // Reset capturing state yield return null; } private void ShowPhoto() { _uiManager.UpdateBG(screenCapture); } }
@OrangeCat-vj4qx2 күн бұрын
hero
@SpeedTutorКүн бұрын
Thanks for checking it out :D
@Tryste2 күн бұрын
Thank you agaaain!
@SpeedTutorКүн бұрын
You're very welcome! :D
@4Raynixx2 күн бұрын
thank you bro, im only downloading the new version of unity because of this 👍👍
@SpeedTutorКүн бұрын
Awesome, good luck with it :D
@4RaynixxКүн бұрын
@@SpeedTutor Thank u
@SpeedTutor2 күн бұрын
Check the related video link ("CLICK HERE -- GameDev Deals & Savings Hub") on this video and all the links will be in that videos description (Due to links not being clickable in shorts) ️Unity Sale: bit.ly/UnitySalesHub ️FREE Weekly Publisher Sale (+FREE Asset): bit.ly/WeeklyPublisherSale OVER 225+ Scripts, projects & assets PATREON HERE: ️bit.ly/SpeedTutorPatreon SpeedTutor Unity Store: bit.ly/STUnityStorePuzzlePacks
@acrkasa2 күн бұрын
thanks
@SpeedTutorКүн бұрын
You're very welcome!
@AWBSounds3 күн бұрын
I have a feeling that the guy who made the SFX pack saw your video and noticed a bunch of people were getting his pack for free... it's now $6 for the same product lol :/
@SpeedTutor3 күн бұрын
Haha, maybe so! Shame about that one, I think it's always worth having something free on an asset page to help people discover the other great content you might have.
@powerfunk65883 күн бұрын
All these so called beginners tutorials use too much jargon. It makes them very difficult to understand.
@SpeedTutor3 күн бұрын
What don't you understand? :)
@LuciPlaysGames3 күн бұрын
Found this video via reddit while looking for beginner tips on baking lighting in my vr worlds (I need quest friendly volumetric light for the windows) I just wanted to thank you because this was so straight forward and simple that I am sure it will work today, 2 years later. I'm sorry everyone was being horrid to you on reddit this looks amazing
@SpeedTutor3 күн бұрын
Haha, you're very welcome! I'm glad it was a help to you, it's one of the oldest tricks in the book. You don't have to apologise about anything, the Reddit crowd is a difficult bunch. Haha. Best of luck with your VR project, keep me updated! Hope to see you comment again in the future! :D
@Born2B_3 күн бұрын
thanks. This vid was very helpful to me cuz I'm verybegginer haha
@SpeedTutor3 күн бұрын
You're very welcome, good luck with your projects! :)
@Rowland48255 күн бұрын
"Free Built-In / URP / HDRP" really makes it look like it's free for both.
@MrMagic95 күн бұрын
Can i have assest
@SpeedTutor4 күн бұрын
It's not free anymore, sadly. There is a new free asset for this week :)
@MrMagic94 күн бұрын
@SpeedTutor what? Asset
@Nebulaoblivion5 күн бұрын
1:21 literally in their own example, its not performing as well as the free built in FSR?
@Ruben-pq5iu4 күн бұрын
Yeah, that also confused me.
@Gromonculous2 күн бұрын
Looking at the built in Unity image quality, I can clearly see it looks really blurry compared to the rest. So I guess what that does is, gets almost as good fps as Unity but has the quality of DLSS, which is considered the best.
@GBBass5 күн бұрын
Can you give another like it lastest one
@SpeedTutor5 күн бұрын
There is another free asset right now :)
@GBBass5 күн бұрын
@SpeedTutor which one ?
@SpeedTutor4 күн бұрын
If you follow the link it will take you to the current one that's available!
@GBBass4 күн бұрын
Which one from the both is the link ?
@Fadiabuzant5 күн бұрын
unfortunately, I can't buy it due to the payment getaway issue in the assets store. I tried credit card and PayPal and none of them worked for me. 🥲🥲
@SpeedTutor5 күн бұрын
Oh damn, does this happen often?
@stanleye.minnickiii1145 күн бұрын
Has anyone else tried doing this in unity 6? I'm not having any luck with the Unity Black Theme in 6 myself and wondering if it's a me problem or if that approach won't work for 6.
@SpeedTutor5 күн бұрын
I haven't tried myself but I'll give it a try and see!
@stanleye.minnickiii1145 күн бұрын
@@SpeedTutor Thanks, any tips to get this working in 6 would be greatly appreciated. Sorta crazy that this isn't just a feature of the software in 2024. :P appreciate the help.
@vefects5 күн бұрын
Thanks for featuring our free Candle VFX pack! Glad you liked it <3 We've also released Zap VFX for free, so enjoy that one too :)
@SpeedTutor5 күн бұрын
Thanks very much! Amazing stuff from you. Thanks so very much for providing it to the community. Your fire VFX are absolutely awesome too.
@UTTheLaw6 күн бұрын
I already own most of the "good ones", but, for that price it's still worth picking up the bundle! ...I think I might be a bit of a digital hoarder! 😉 Thanks, Matt! Great run-down!
@SpeedTutor5 күн бұрын
Haha, you're telling me - It's added to my list of 20,0000000000000000 assets that I already own! :P
@amandarandombage25536 күн бұрын
Doesn't work. I think you missed a crucial part :(
@SpeedTutor5 күн бұрын
Which version of Unity are you using and what pipeline?
@kyoseoul6 күн бұрын
I am still furious that i missed the Unity 6 Toolbox 😠 The VALUE I MISSED Anyway glad i found this earlier
@SpeedTutor6 күн бұрын
Oh damn, did you just miss out on it? Glad you got hold of this one though! :D
@nareshbisht16 күн бұрын
Which one was that? What all assets were in that? Is that the one with 10 LayerLabs GUI Pack?
@kyoseoul5 күн бұрын
@nareshbisht1 I dont remember what exactly was in there since I missed it, however it was some insane value. It specifically had some I assets I wanted. There should be a video in this channel talking about it.
@mrzaphkielYT6 күн бұрын
Mehh, i will skip this, i already spend too much for december. Things that i like from the bundle tho: -Stylized Lost Cave -SYNTY Animation Idle -Infinite Lands: Node-Based World Creator -Stylized Fantasy Girls NPC Pack #3
@SpeedTutor6 күн бұрын
Spent on yourself or others? Haha.
@ZactarZero6 күн бұрын
the boar asset in this bundle is so random lol. still a great bundle
@SpeedTutor6 күн бұрын
Now I want to make a game with a little mini boar running around! :P
@random_precision_software6 күн бұрын
That's nuts ! Matt 😮 well worth it I was looking at the terraforming 2d terrain this morning so that's handy. Nice Ione Matt as always m8 😊
@SpeedTutor6 күн бұрын
Haha, awesome stuff! You've always got your eye on something.
@SpeedTutor6 күн бұрын
Another mega bundle is here and I've got you covered so you don't miss out and you know exactly what you're getting! Let me know what you think! :) 🎁Unity Sale: bit.ly/UnitySalesHub 🎁SpeedTutor Unity Store: bit.ly/STUnityStorePuzzlePacks 🎁 Get OVER 225+ scripts & projects on my: bit.ly/SpeedTutorPatreon
@vasileiospgr6 күн бұрын
🤯🤯🤯
@SpeedTutor6 күн бұрын
Careful with those explosions!
@ravenillusionstudio6 күн бұрын
🎉🎉
@SpeedTutor6 күн бұрын
So FAST! :D
@OrangeCat-vj4qx7 күн бұрын
thankyoouuu
@SpeedTutor6 күн бұрын
You're very welcome!
@DARK_AMBIGUOUS7 күн бұрын
The parallax effect looks cool from far away or when driving past buildings but when looking up close, the flat 2D items in the room look bad. There could probably be a way to make ot so that if you get close, a couple 3D room appear and the flat 2D square the has the paralax effect on it will disaprar revealing a real 3D room behind it, there will only be up to 6 real rooms that can exist in real time and instead of using LOD's, the rooms just get moved around, once one goes off the screen, it will teleport to the next window that just came on to the screen and also when they teleport around, the objects get randomized and the colors change and stuff so no rooms look alike. The objects in the room will still be very low poly but they will still be 3D.