Questions tagged [prefabs]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

Why doesn't the prefab change in the app?

Such a problem: from the script, I change the image of the sprite of SpriteRenderer component (like another skin) in a certain prefab, having a link to SpriteRenderer. And the problem is that when I ...
1
vote
1answer
37 views

If I don't use PrefabUtility class, how can I save my changed prefabs and build without exception?

I'm designing a racing game for my graduation project. I used PrefabUtility.SaveAsPrefabAsset to save my color change on the car prefabs, I finished the codes and it work well in Unity, but when I ...
0
votes
1answer
43 views

How to make collisions occur between objects using the same script?

Well what I’m trying to do is have cars travelling on the road. The cars have a trigger at the front and a hitbox at the back of the cars. What I want to happen is when the trigger hits the hitbox it ...
1
vote
1answer
248 views

Instantiating Prefabs at run time

I'm trying to move my project to Addressables and upload assets, prefabs and screens to an archive on the server. I'm a new in Unity and this a bit challenging for me. I've prepared all prefabs for ...
0
votes
1answer
39 views

How to store the configuration of Unity prefab components during map generation?

I managed to have a basic map generation algorhytm, but now it needs some content. I generate abstract map data, which then will be used to build the map itself. When I want to generate monsters, ...
1
vote
1answer
40 views

How can I insert a prefab instance programmatically inside the Canvas, in the bottom-left corner of the Canvas?

I am trying to create the Snake game in Unity, based on this video tutorial. I have also viewed this tutorial. I have created the new project with the 3D template and manually added the Canvas. I ...
0
votes
1answer
27 views

How to translate prefab made of hierarchy of 3d objects

I am trying to translate a prefab of a puzzle piece made of a hierarchy of cubes but it's not working. I have tried translating the GameObject using its transform and the function Translate, it did ...
0
votes
0answers
13 views

Perhaps all the settings that apply to prefab apply to terrain.terrainData settings?

I have a brush widget in which the following settings: Can I apply all these settings to terrain.terrainData? Common settings terrainData and ...
0
votes
1answer
14 views

Referencing Tilemap inside Grid Prefab

I have a prefab of a grid which contains 3 different tilemaps: Main, Foreground, & Background I want to reference the tilemaps inside a script of the prefab but can't figure out how to do that.....
0
votes
1answer
55 views

Can I add non-trees to terrain.terrainData.treeInstances on Unity 3D?

I need to create a brush in which there will be stones, poles, bushes and other elements of the environment. I bought a Prefab Brush. Whether it is possible to add the objects that I draw on the ...
0
votes
1answer
93 views

Creating a prefab throws issue

For past couple of hours I'm trying to create a new prefab out of my environment but it keeps throwing an error: Error: You are trying to replace or create a Prefab from the instance '...