Colors missing when building my project Unity - unity3d

I recently started implementing a cellular automaton in unity and now I'm trying to build the project but the colors, which got displayed in the editor demo:
are not displayed properly after building:
I implemented the color with:
CubeMeshes[cubeMeshesIndex][gen].GetComponent<MeshRenderer>().material.color = ColorsArr[color]
where ColorsArr[color] is e.g. Color.blue
My always included shader list looks like this:
What exactly am I missing?
Edit: I was able to solve this by running the script and checking which shaders are added on the material during runtime when i click on the instantiated object in the Hierarchy. For me it was the "standard" shader which I then added to the "Always included Shaders" list as the 8th option.

i have this error with all of my projects, and it has nothing to do with shaders. you just click on the gear icon in the top right corner of your player settings, and press reset. then, you can add the title and other options again, and it will work. good luck!
EDIT: maybe try resetting the graphics settings as well.

Related

i cant find or add specific components to my objects in unity

I have been watching tutorials on youtube (i'm new to unity), I was trying to add a rigid body to my player, which I've never done. In the video they clicked add component in the inspector then physics then rigid body. but i don't see physics and when I search for it nothing appears. the only options i get are:
Effects
Layout
Mesh
Miscellaneous
Rendering
New Script
Underneath Box Collider i get a warning saying the the "module that implements this component type has been force excluded in player settings" could this be the problem? If so how would i fix it?
Thanks.
Try go to the PackageManager, switch to Built-In Packages and see if the package Physics is installed. Sounds like it has been actively be removed (uninstalled) or you somehow broke the Packages/manifest.json file.
If you can't even get the PackageManager try to reset the packages as described here via the top menu bar → Help → Reset Packages to defaults
or just directly replace your Packages/manifest.json with a one from a fresh empty project
Also note
Our first TECH stream release of the year is available as of today. Unity 2020.1 includes a wide range of features and improvements that make Unity workflows even more intuitive and make you more productive, while Unity 2019 LTS remains the recommended version for projects in production.
The PackageManager got an overhaul and a lot of users had issues like yours. See e.g. this thrread.
You should stick to the LTS versions, currently 2019.4 LTS (except for experimenting with the very newest features).
So if you type in the search bar of Add Component "Rigid" nothing pops up? If not I believe it should.
The problem could be in your libraries. Try deleting the library in your project (with Unity closed). Maybe if you have not made much progress in this project you could try opening a new unity project and seeing if it works.

Cannot type in Unity Inspector

I can't type in the Unity inspector or rename any object. I tried clicking in many different areas recommended from the web. Note that this is not an error, but something I simply can't do. Is there any settings I need to turn on or off?
There are two ways to fix this:
Solution A
Go to layout then set the layout to default, it's like resetting the unity.
Solution B
Restart unity, just Close the Unity editor and open the project again.
Hopefully, one of these helps you.

How do I enable antialiasing in Unity?

I am interested in adding antialiasing to my project in Unity. I read that to achieve this you must import Post Processing Stack. I have downloaded it from the asset store but i cant figure out how to use it. There are also settings in: Menu -> Edit -> Project Settings -> Quality, but they seem to not work.
What exactly do i have to do?
To use the PostProcessing Stack add a PostProcessingBehaviour component to your camera. Then, in the project window, create a PostProcessingProfile using right click and context menu.
Then, drag the newly created profile into a slot in the Behaviour component.
The profile has its own editor and changes can be made interactively.
I have a feeling antialiasing only worked if the camera rendering mode was set to deferred but that might not be true.
Good luck

How do i add an icon to my Unity Game

So I made a game on unity and i would like to add an icon to the game, so that a desktop icon in custom made. I tried looking it up in google, but i can't seem to find the answer, as all the answers that are given are for something else.
On player settings, check the inspector, one of those tabs says "Icon" check the " override for Standalone" and simply select the icon you want.
I'm kinda late but oh well. Found a helpful video on YouTube: Import the icon you want into the assets as a picture format (.jpg .png whatever etc) and when you go to build your game, click and drag the icon you imported over the box next to "Default icon". I did that with mine and it worked, no need to check "Override for standalone" (I don't even know what that does) Note: I did this on Unity 2020.1.0f1 Personal.
Sauce: https://www.youtube.com/watch?v=vcwxWWRPwLA

cocos2d error while loading sprite

I am having a quite strange problem in loading a sprite that was previously correctly loaded. I get this error depicted in the XCode console:
CCTexture2D. Can't create Texture. UIImage is nil
Couldn't add image:test.png in CCTextureCache
I can not see what is changed any advice?
Do you see test.png in the project navigator ? If yes, click on it, and make certain it is included in the target (show Utilities, at the top right, above the word 'view', the right button of that group of 3 buttons). Make certain that in the pane 'Target membership', your build target is selected. If not, well... you know what to do.
Also, as a 'personal rule', before trying anything when this sort of thing occurs, i tend to clean the target (including the project derived data), then a build and test again. Xcode can have its moments with respect to keeping track of files and stuff.
Make sure the file is named "test.png" and not "Test.png" because the iOS devices use a case-sensitive filesystem. The file also needs to be added to your Xcode project to the correct target.