Unity, interior poly always missing in clothing

I’ve modeled interior polygons but for some reason they do not show up in Unity. I’ve tried changing import settings for normals to both calculate and import… How do you have a tshirt’s interior poly show up?

enter image description here

unity – Is using events a good way to have the option to return out of a method or alter its normal execution?

Let’s say I have a script that calls a method frequently, and when doing so wants to allow other objects to know about it and potentially alter what happens in that method. This is fairly simple to do using C# events:

public class PassByReference 
{
    public bool foo;

    public PassByReference(bool foo)
    {
        this.foo = foo;
    }
}

public class Example : MonoBehaviour
{
    public event Action<PassByReference> OnSomethingHappened;

    private void DoSomething()
    {
        var returnOut = false;

        // Do some stuff

        var passByReference = new PassByReference(returnOut);
        OnSomethingHappened?.Invoke(passByReference); // Some other object can read and alter this

        if (passByReference.foo)
            return;

       // Do some more stuff
    }
}

Is this a good way to do things if one anticipates that, based on a combination of the information given by the event, and their own properties, other objects may want to stop the second half of the Example method from running (or maybe alter what happens)? I guess what I’m trying to do is prevent the Example class from having to store references to many other classes that will interact with it only occasionally, and clog up the method with many if statements. My main concern, though, is that frequently creating new classes to pass data via reference in the event(s) can lead to performance issues, especially if many objects in my game are using the Example script.

Material is missing after build with Unity Cloud

when I tried to build with unity cloud materials aren’t in the build.
there is no specific shader I just used the default URP material.

enter image description here

after a while, I found the problem.
when I import new models I have to make the new material and replace it with the default material so there is no problem after the build.

but I want to know is there a better solution to this problem.

enter image description here

I also checked my unity cloud build report and there weren’t any errors related to URP or materials

Which browser does support Unity Web Player games the most?

I have got no idea which browser should I use, formerly it was chrome that supported unity web player the most but now it let me down. Many browser support such things no more, I’d be thankful for some recommendation.

unity – Camera animation stutter on first launch

The camera stutter for a fraction of a second when animating a camera from one position to another position. This issue only happens when the game is launched for the first time after installation. The camera animation is smooth for further game launches.

I am using LeanTween to animate the camera. No data is loaded while the camera is animating.

Environment:

Unity version: 2019.3.03f

Mobile platform: iOS

iOS versions: 12 and above

I would appreciate any suggestions and thoughts on this topic. Thank you.

unity – Why is my object not destroyed when the HP is reduced?

I tried to write a script that declares an object to have hp 90 initially and every time you click on the object, it turns red and will reduce the hp by 10. When the hp is lower than 10, it should destroy the object.

But when I click my object 10 times, it still is not destroyed. How can I fix this code?

using UnityEngine;

public class NewBehaviourScript : MonoBehaviour
{
    
    public void OnMouseDown()
    {
        GetComponent<SpriteRenderer>().color = Color.red;
        var hp = 90;
        _ = hp - 10;

        if(hp < 10)
        {
            Destroy(gameObject);
        }
    }
}

sprites – unity spriterenderer scale to fit screen portion

let me explain what i have.
a camera that render only a sprite ( sprite renderer) and what i’m looking for is to scale that sprite renderer to fit a screen portion (not the entire screen) for example 0.145 (normalized) anyone can help me?

fix : i mean, from 0 to 0.145 so the entire area ( it will be a 125×125 image ) so i need to keep the aspect ( same width and height) and i’m using orthographic camera

Material is missing after build by Unity Cloud in URP

when I tried to build with unity cloud materials aren’t in the build.
there is no specific shader I just used the default URP material.

enter image description here

after a while, I found the problem.
when I import new models I have to make the new material and replace it with the default material so there is no problem after the build.

but I want to know is there a better solution to this problem.

enter image description here

I also checked my unity cloud build report and there weren’t any errors related to URP or materials

How do I fix missing anti-aliasing in the Unity scene view and game?

Screenshot of scene view

Both the editor and the game seem to lack anti-aliasing even though quality is set to Ultra.

I chose the "3D" project template when I created the project, so I am using the build-in render pipeline.

How to trigger onclick for Unity Selectable by script?

As title, I know Button can be triggered onclick by button.onClick.Invoke();

But how to simulate onclick event of Selectable?

Thanks for the help.