Solved Unity Chams invisible

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

mrkinaujr

bad coder
Dank Tier Donator
Mar 11, 2020
13
283
2
Game Name
Ultimate Hardbass Defence
Anticheat
None
How long you been coding/hacking?
on and off for about 5 months now
Coding Language
C#
Hello,

i am currently writing a Cheat for the game Ultimate Hardbass Defence.
I wanted to make basic Chams using shaders in C#. I can see the enemies through the wall but as soon as i can see them directly they seem to go invisible sometimes. I am using the inbuild GUI API.
Can somebody with unity experience tell me what i am doing wrong?

Current Code:

C#:
            foreach (GameObject go in GameObject.FindObjectsOfType<GameObject>())
            {

                if (go.tag == "Enemy")
                {
                    
                    var rend2 = go.GetComponentsInChildren<Renderer>();
                    
                    foreach (Renderer renderer in rend2)
                    {
                        DefaultShader = renderer.material.shader;
                        renderer.material.shader = Shader.Find("Hidden/Internal-GUITexture");
                    }
                }
            }
 

mrkinaujr

bad coder
Dank Tier Donator
Mar 11, 2020
13
283
2
Isnt the color part of Properties ARGB? yours appears to be 0 alpha

You need to enable (or disable) Z checks in your subshader (google tells me in unity thats ZWrite and ZTest)

That's the main part you're missing. I didn't read the fragment or vertex shader part so if the problem persists after fixing that, you're gonna wanna check it out
Got it now, thanks. The Error actually was me being Stupid and being tired kinda. I had a resource package, not a asset bundle.
 
  • Like
Reactions: mambda

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,298
37,938
269
code is fine

you sure the shader isnt whats at fault? Try a static color like red or something
 

mrkinaujr

bad coder
Dank Tier Donator
Mar 11, 2020
13
283
2
code is fine

you sure the shader isnt whats at fault? Try a static color like red or something
I tried making my own Shader now. It seems that it does not work. It's just a pink texture and i can't see them through any walls.
 

mrkinaujr

bad coder
Dank Tier Donator
Mar 11, 2020
13
283
2
What's your shader code?
Here is my Shader Code

This is my loading Code but that should be right

C#:
            var myLoadedAssetBundle = AssetBundle.LoadFromFile(Path.Combine(Application.streamingAssetsPath, "test"));
            if (myLoadedAssetBundle == null)
            {
                Debug.Log("Failed to load AssetBundle!");
                return;
            }
            ChamsShader = myLoadedAssetBundle.LoadAsset<Shader>("Chams");
               
            Instantiate(ChamsShader);

            myLoadedAssetBundle.Unload(false);
 
Last edited:

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,298
37,938
269
Isnt the color part of Properties ARGB? yours appears to be 0 alpha

You need to enable (or disable) Z checks in your subshader (google tells me in unity thats ZWrite and ZTest)

That's the main part you're missing. I didn't read the fragment or vertex shader part so if the problem persists after fixing that, you're gonna wanna check it out
 
  • Like
Reactions: mrkinaujr

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,134
78,998
2,392
@mambda is there anything you don't know? btw you're top post of the month oh snap
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods