I EXPECT FOR MY ENGLISH, BUT I AM USING GOOGLE TRANSLATOR
hi I'm creating a multiplayer game I put the graphics AAA, among these I put the component PostProcessingBehaviour, on the UI menu I made, on the graphics settings, I would like with a button to disable all the components that I put on the camera to make the graphics AAA , for less powerful PCs, so they can play all, to give me an example even to disable the PostProcessingBehaviour via a UI button, then I tried to use onclick, put the camera and put on the "bool enable" works but the game is online , and then it does not work, but if it was offline my problem was solved enough to use the button ui, but with the online I can not of course, what script I could use, the script will have to put on the UI button and disable the script component in this PostProcessingBehaviour case,
how can I do? do you recommend a script? I have little experience and I'm learning, I would need this thing, thanks in advance
IN SHORT WORDS
I would like to know a script that disables the PostProcessingBehaviour component or script from the "camera" object
use language c#
use unity 3d
Related
I'm new to Unity and my goal is not to make a game, but a mobile application, I don't use the Android SDK because I need to do something with augmented reality and I need to do it with Unity, it's getting quite complicated because I'm not familiar or with the language or with anything, in short, I was able to change scenes by means of a button, like a log that verifies things, but Unity does not have a scene transition effect or something similar, I saw several videos where it can be done a transition, effects and so on, but they are for when you touch a button or touch the screen in this case, I would like to know if there is the possibility of being able to implement an effect after it effectively validates the information and then makes a translation effect to the other scene, is this possible, thanks!
You could use:
SceneManager.LoadSceneAsync
Unity SceneManager.LoadSceneAsync manual
for loading scene while you run your own transition. Fade in/out is the most common transition for such occasions.
I was Working on a new application on unity and i wanted to make the perfamonce good for phones so what i did is i killed the playerloop that's mean i switched to the lowlevel unsing unityengine.lowlevel (playerloop) but the problem is i can't detect any touches i tried everything :
button click (normal) - dosn't worked
event systems - dosn't worked
addlistener button - dosn't worked
mouse click on the update - dosn't worked
so i read some unity articles and everything in stackoverflow and i didn't find anything .
will i killed the playerloop because a developer named "Jon Manning" sad sow and he explained how to detect touches on iphone and he did say that detect touches on android is possible but he didn't say how you can see the video here to better understand : https://www.youtube.com/watch?v=C7CZyqHGKXw&t=1812s
so if anuone can help i will be very greatfull
I personally have created an Android app before, and the easiest way to detect touches on Android phones are with these functions:
private void OnMouseDrag() { // called every frame the user has their finger held down while touching the collider or GUI element }
private void OnMouseDown() { // called when the user presses the collider with their finger }
They work perfectly for single-touch applications, if you want multi-touch capability there are other methods you can use.
The only caveat is that these functions are only called when the user's finger touches the collider, so every object you want to have interacted with must have a collider attached, along with this script.
There are also other OnMouse functions which you can look up on the Unity Docs, if you want more control.
I don't Really understand Why unity realised the UnityEngine.lowlevel if there is no way to keep using the app or the game ones you kill the playerloop ,Will i know that it work on ios but What about android i think android is really important than ios because there is like 7% of the world using ios and the rest using android ,Will i know that the propably 7% are reach but i thnik that is not good reason
I will be using android studio and java for my app , and i hope unity team will do something about that and if anyone searching how to wake up from the lowlevel if you're not building for ios don't bother you're self go create plugin if possible or just don't use the low level and of course google play will not give you a nice number of downloads because of the perfamonce and the battery , unity is only for games stick with that i already made a lot of apps non of them got more than 10k downloads because of the perfamonce and the battery
I'm building a Unity app for which target environment must include Mixed Reality. I've been able to find very good file picker assets on the assets store, but none of these seem to work in the Mixed Reality Headset, although they appear on screen even in VR mode.
Are there any default MR assets that I should be using or is there anything I should be looking for? Or do I have to build all this from scratch?
Thanks
The difference in VR is that there's no cursor, so normal EventSystem doesnt work out of the box. The simplest workaround that worked for me was this:
Add a box collider component to your UI elements. Raycast from the controller against box colliders. If the collider has a component that implements IPointerClickHandler interface, you can fire OnPointerClick(PointerEventData e) method against it and it will be considered a valid click (although thah bypasses eventsystem navigation).
You'll need to pass a PointerEventData object, I can't remember if you can just pass a null, but I am pretty sure passing a new PointerEventData(EventSystems.current) is fine.
For drags and more complicated events you might need to fill some additional fields for the UI to behave correctly
I ended up writing my own file picker using the "file manager" assetpurchased from the asset store and the mixed reality toolkit. Would it be worthwhile for me to put it on the asset store or is this overtaken by events now that we're have a better mrtk available?
I have made an Android game using Unity, and now for the finishing touch I need a nice GUI, but unlike a GUI that just takes place in a different Unity scene, I would like it to just be a layover in the scene where the game is played. Basically you can see the game in the background, but there is a GUI with some buttons like setting and play. Say you click play, then the GUI would go away and the game would begin. Is this something that can be done in Unity? Any help would be greatly appreciated, thanks!
Bonus question - best way to make a good looking GUI, should I design it myself or should I buy from the Unity Asset Store? Pros and Cons of each?
You just need to create the ui in the same scene as your game using the new unity ui system and the canvas object. Than for example on play button click you just aniamte the ui outside of the visible area or remove it from the canvas.
I want to create a GUI that could be at the bottom of a player's screen all the time. Not a main-menu UI, but an interactive, in-game UI.
For example:
It is crucial that the player in unity must be able to interact with the UI (i.e. click it) and it is also extremely crucial that the UI can be controlled by code (C#). I must be able to create and control this UI programmatically.
How would I go about this?
I have the very latest version of Unity3d installed.
First of all, you can't learn that here.
1. Learn Basic UI. Go to the Unity website and lean each UI compoent such as Button, Image, Panels...
https://unity3d.com/learn/tutorials/topics/user-interface-ui
2. Learn photoshop/Illustrator to get the good UI quality from the first link or hire a UI artist. Many videos on Youtube for photoshop/Illustrator UI design.
https://www.youtube.com/results?search_query=photoshop+ui+design+tutorial
3. Learn C#. Important Unity API for this:
Unity events
IPointerClickHandler
IPointerDownHandler
IPointerEnterHandler
IPointerExitHandler
IPointerUpHandler
Button.onClick ((Button.onClick event)
Text
Image
Slider
Good luck!