Unity Transparency Sort Axis doesn't work - unity3d

First, My goal is render sprite objects as below.
So, I set Edit>Project Settings>Graphics>Transparency Sort Mode as "Custom Axis" and Transparency Sort Axis as (0,1,0).
But it only works in the Scene View. When I run play mode, the Transparency Sort Axis I set automatically return to the default value - I mean, Custom Axis + (0.49,-1,0.49). Then the objects' states in the play mode are as below.
I've been suffering from this problem over than a week... because as far as I remember, when I was much more unskilled Unity beginer and tried some tutorials, the setting I set in this way worked in the play mode without any issues.
I think maybe the reason is in the asset I imported because when I made a new project without any asset and tried exactly same procedures, it worked.(transparency sort axis didn't changed automatically during play mode). But I'm still not sure about this problem's reason yet and don't know how to fix it.
Could you please help me solve this problem?

Related

UNITY: Everything looks Low Resolution. Even SVG vectors

I'm new to Unity so Hopefully this is an easy fix.
So everything looks super low res for me. I wish my images looked high res.
Even SVG looks low res even though they're vector nodes, I don't get that at all but I assume Unity doesn't play with svg yet? the black outline graphic is SVG, the rest are PNG with alpha.
Take a peek at my three different windows. Let me know your suggestions (remember I don't know anything so the easiest thing can been overlooked)
There is a "Scale" slider on top of the game view. Right now it is set to 2.8x. When you do that Unity just zooms in but it doesn't set the the resolution or actually change anything at all. It's like moving the screen really close to your face :D Nothing else besides that particulat window is affected by this setting. So my advice would be to always keep it at 1. Unless you want to see something specific at the screen of course

How can I create a button using mrtk 2.4 and Unity 2019.4 (AR for Hololens) with a custom shape?

Hello.
I'm trying to create a button which is shaped in a custom, trapezoid-ish shape.
so far I've tried manipulating colliders on regular MRTK - toolbox buttons, and using
a 3d model as the button (like in Hand Tracking Example 1) with the scripts that the
documentation suggests (NearInteractionTouchable & PressableButton) so far with no success.
So, is there maybe a different way to create a custom shaped button for my Hololens UI?
thanks.
After my test, the guide How to make a button from scratch works fine for me. If you got that issue while using this document, did you adjust the Press Setting after adding the PressableButton component? The default distance data may be invalid, you need to reassign the distance values according to the actual size of your 3D model. If it still cannot work after trying it, please feel free to feedback.

How to disable image detection if there is already a detected image

I have the, in my opinion, simple problem of disabling image detection with the AR Camera. I have the problem, that my app detects an image from the image library and spawns an object etc. everything according to plan.
But the problem is that if move the camera over another detectable image, it recognizes it. This is bad not because it spawns something additionaly but because you can "collect" the images in my app, so it unlocked the other detected one even though it shouldn´t.
So how can I disable image detection without turning off the AR-Camera?
I so far tried to simply disable the "ARManager" and the "ARTrackedImageManager" script (.enabled=false), but it didn´t solve my problem, because the app still detects other images.
Hope I could explain what my question and problem is properly. Any help is appreciated!
It really depends on what library you're using to detect the image. Generally, most marker tracking libraries will create a marker object in your Unity scene. You can disable these marker objects after you find one, and only leave the marker you're interested in. Make sure you also set the number of tracked images to 1 so you won't accidentally find two markers in one frame.

How to create a slider without an outline?

I want to create a slider without an outline.
Like this one:
Note rounded edges.
I assume I need to create a sprite for that. Unfortunately, I can't find any good tutorials on sprites for sliders. I think the easiest way would be to edit the built-in one but I don't know how to get it for editing.
This is how the original slider from my Unity looks like:
Note the outline.
So, surprising solution that should be available to all of us.
Put the default slider in and go to the Source Image for both the Background and Handle. Instead of using what is there, change it to another Unity Standard sprite called TouchpadSprite. This should do the trick. Not sure if the fact that this is called 'touchpad'sprite will cause a problem when make a PC game, but I doubt it. FYI the TouchpadSprite is from the "Standard Assets (for Unity 2017.3)" that is available for free in the Unity Asset Store. Feel free to only import the sprite itself. The Asset Pack itself is pretty large, but there is a lot of good/useful stuff in there.
Also, you will have to increase the Pixels Per Unit Multiplier value. My picture shows what I had to increase it to. This will allow you to choose the rounding of your edges as well. Play with it and let me know if it works.
Hope this helps!

Black 3D Models - Unity3D

I just recently started using Unity3D, and have imported this object from Sketchfab. When I imported it, it provided all the necessary textures and meshes, but it's all black as shown in the images below. It's the same case for any other object I try to add from the asset store. I've tried to fiddle with the light source, but that doesn't seem to work. Thank you in advance.
Edit: This is what my mesh properties looks like. I have selected "pearl_body" and it's still all black.
You need to expand your model in the Hierarchy(left panel) view untill you will see Mesh Renderer component in the Inspector(right panel). Then you will be able to set the material. Probably you will need replace lambert45G in the material view with BaseTexture.
That should fix the problem.
You can read more about materials here, and about mesh renderers.
I had the same problem and found a solution. Not sure if it will work in your particular case, but here it goes:
I had a model that worked fine in unity until I rigged it, then it looked black. What caused this was that I applied a Smooth modifier after the Skin modifier. I solved it by:
Saving the Skin modifier info by clicking on "Save" at the Advanced tab.
Reset Xform / convert to editable poly / smooth modifier (needed in my case as I forgot to use it when the model was finished, before rigging)
Convert to edit poly again.
Apply skin and load the previously saved skin file.
That's all. Cheers!