Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
26 views

I want to build a Android native library which contains a prebuild so files, for example librga. And package it to an aar. This aar should: Contains librga.so and headers. I write some jni interface ...
祖国瑞's user avatar
1 vote
1 answer
124 views

I have a handful of prefabs in my project's assets which I am frequently dragging into and out of the scene in order to test them sequentially after changing the code in their attached scripts. They ...
Nicole's user avatar
  • 45
1 vote
2 answers
45 views

I want to multiply my prefab (bandit) every few seconds, but if I remove my prefab in the hierarchy it is no longer spawned. I put this in my project view as prefab but this doesn't seem to work. The ...
Romy Lambrechts's user avatar
0 votes
0 answers
61 views

I'm developing a game like solitaire and all my cards are made from the same prefab. All cards in the tableau follow the exact same script but for some reason, the first card in the first tableau can ...
shannon's user avatar
0 votes
1 answer
50 views

I am a beginner to Unity and I am trying to make a character selection for a local multiplayer game. Currently, I have my code and some buttons but when I run the code, new buttons appear stacked over ...
D F's user avatar
  • 1
0 votes
0 answers
52 views

So I am making a proceduraly generated dungeon, Ive got a algo that creates base of the dungeon out of cubes, it creates rooms, hallways and staircases. Once I had that I started to place prefabs on ...
najman's user avatar
  • 1
1 vote
0 answers
1k views

I was trying to build android vulkan app from this guide Whenever I try to build, execution error occurred in "app\build\intermediates\cxx\Debug\1k4v2e55\logs\arm64-v8a\prefab_command.bat" ...
김병훈's user avatar
0 votes
1 answer
81 views

I am working in Unity (C#). I need help to rotate a 3D prefab around its own axis (be it the x or y axis). Prefab consists of 10 child objects. Its purpose is to make the Prefab rotate 90 degrees by ...
Cirill Parnó's user avatar
-1 votes
1 answer
614 views

Whenever I try to assign a GameObject or TMP Text Box to a prefab's public variable, I get an error message that says, "Type Mismatch". The variable is a list (used to be array) and I am not ...
VINCENT SMITH's user avatar
1 vote
1 answer
235 views

When I add prefabs to the scene, the instances lose their connection to the original prefabs in play mode. Before play mode: In Play mode: If I instantiate them during runtime with PrefabUtility....
GniLudio's user avatar
1 vote
0 answers
59 views

I created an asset using obi-rope and exported a unity package but when I imported it in a different project this error popped up! I tried to re-create the unity package, and I noticed obi-rope is ...
Rakesh Kr Yadav's user avatar
1 vote
2 answers
314 views

I have a class like this: class Thing(val name: String) { internal var complexObject: ComplexType? = null override fun equals(other: Any?): Boolean { return other is Thing && name == ...
Felix Dombek's user avatar
  • 14.6k
0 votes
1 answer
201 views

How can I get Prefab Variant's "base" (Field named "Prefab" in picture) from Editor script? I'm on Unity 2022.3, but UnityEditor.PrefabUtility seems do not have corresponding ...
user-id-14900042's user avatar
1 vote
0 answers
408 views

I'm working on a Unity project where I need to optimize performance by baking lightmaps for my prefabs (the prefabs should always look the same regardless of their position so there is no point in ...
Bishok's user avatar
  • 439
0 votes
1 answer
49 views

I have a building placement project which doesn't work with 3D house objects. The objects all have rigidbody and box collider components while only the house prefab objects have child objects. My ...
Kıvanç Cantimur's user avatar
0 votes
2 answers
102 views

I'm making a 3D Unity game and trying to get randomly-spawned prefabs disappear when they collide with the player object, but I'm not sure why it isn't working. private void OnTriggerEnter(Collider ...
Anya Mittal's user avatar
-1 votes
2 answers
104 views

so basically I have a TargetSpawner which is simply a BoxCollider in the shape of a rectangle put on top of the screen which spawns little sushis (TargetPrefab) to shoot. The little sushis are prefabs ...
Mauro Carnesi's user avatar
0 votes
2 answers
62 views

I am not sure where I can post this thread because maybe the problem are about scripting, or maybe that is about modeling of tilemaps, or maybe that could be about the prefab configuration. I have a ...
Pozo's user avatar
  • 13
0 votes
1 answer
379 views

I've been trying to load pieces for a chess program which involves loading in a bunch of chess piece prefabs to load on the screen but for some reason it isn't working. Here's the code white_pawn = (...
Flynn1460's user avatar
1 vote
0 answers
96 views

So I made 3 different projects which contain contents of some meshes with materials, shader graphs, and set animation and keyframes using timeline. Then I export contents as one prefab for each ...
blendifi's user avatar
1 vote
1 answer
1k views

Please help, I can’t figure it out myself I have a TextMeshPro Prefab I wanted the height of the object to match the actual height of the text, so I added a Content Size Fitter component to the prefab ...
KOSOY's user avatar
  • 31
0 votes
1 answer
303 views

I purchased a UI asset from the Unity Asset Store, which includes buttons and icons organized as prefabs. I would like to extract these elements as images to edit them in Photoshop. How can I ...
Sayu Sfp's user avatar
0 votes
0 answers
339 views

I have a button that's instantiated as a child of a prefab, when using transform.root it does not return the desired object. GameObject parentObj = this.transform.root.gameObject; that is the line in ...
Splosh's user avatar
  • 1
0 votes
0 answers
117 views

I'm currently working on a 2D Platformer in Unity. I followed along Brackeys Tutorials (will post links below) and everything works like intended, except when I turn my Player Object into a prefab. ...
Yeriwen's user avatar
1 vote
0 answers
221 views

I am currently working on a room editor. The room is a base prefab with scripts. It has a child transform with tiles, which is empty. In my editor, I instantiate a base prefab room, and design ...
Ava's user avatar
  • 522
0 votes
1 answer
698 views

I have a script that updates the Sprite Renderer of the main prefab (the one that is in Assets) but this does not change or update the Sprite Renderer of the instances of the main Prefab. How can I ...
Code Freak's user avatar
2 votes
1 answer
749 views

For context, I don't have much Unity and C# experience, so please don't berate me if the answer is really simple. I'm trying to make a dungeon's edge tiles automatically create walls on their ...
2Mult's user avatar
  • 25
0 votes
2 answers
359 views

I want to spawn random prefabs, but I don't want to have any of them coincidentally be identical. I currently have this code block: int animalIndex = Random.Range(0, 8); int animalIndex2 = ...
f0rCE's user avatar
  • 1
-1 votes
1 answer
48 views

I'm super new to c# and I'm making a 3D game in Unity. I have an int that I want to call upon in another script, but the original script that the int is in, lives on a prefab that isn't on my terrain. ...
toastyducky's user avatar
-2 votes
1 answer
51 views

I am developing a game with Unity 2d, and I am trying to make the player disappear when it reaches the TorchSwordBool. I was successful doing so, but when I tried to instantiate a prefab for the ...
Matthew Pina's user avatar
0 votes
0 answers
1k views

Title says it all, I've looked online for multiple solutions. I'm instantiating a Prefab multiple times for my UI, I'm trying to set the child of this prefabs Image components Materials Colour (what a ...
Anthony Brown's user avatar
0 votes
1 answer
328 views

I'm primarily an Android Java developer, but I have a need for libyuv. I created a module and have it building under CMake. I read about prefab, and for developers like me this is a game changer. ...
Dustin's user avatar
  • 2,264
1 vote
0 answers
199 views

I made a enemy prefab and a object to it (Field of View). The enemy has a Box Collider 2D and a Rigidbody 2D, the FOV only has Box Collider 2D. The enemy checks if a bullet is hitting him and takes ...
CodingGuy's user avatar
0 votes
2 answers
131 views

I have a game where the player speeds up overtime, and shoots projectile bullets. I want the bullets to stay at the same speed relative to the player. So i have to reference the speed variable in the ...
BounteousLark's user avatar
0 votes
3 answers
791 views

I have a "Manager" type class called PlayerManager and I'd like to initialize an object for it in a different class/object using FindObjectOfType(). My understanding is that this searches ...
Fotis Aronis's user avatar
2 votes
1 answer
1k views

I have a bullet prefab in 2D unity and I want to drag a gameObject into a public variable so I can deal damage but it won't work. Here is my code, the gameObject I want to drag in is called EnemyAI ...
Liam Parcel's user avatar
0 votes
2 answers
349 views

I have a problem. I have created a prefab in unity that has a child. I want to place this child on the position x=0, y=0 of the canvas, but it is always positioned on the centre of the parent. How can ...
opaotti's user avatar
0 votes
1 answer
536 views

I have a prefab Block. In my scene hierarchy, there is a lot of Blocks: The prefab contains a code that contains an integer value called id. I wrote a script (to run in edit mode) that sets random ...
Daniel's user avatar
  • 7,800
0 votes
1 answer
49 views

I am new in C# and Unity3D and I'm struggle using events so I need HELP. So I'm making hypercasual game to improve my skills. In the game I want if player hits an item to different things happened. ...
Maxim Medvedevskikh's user avatar
1 vote
1 answer
1k views

Our Android application consists of 40-some Android Library Modules (ALMs), each of which also builds a C++ shared library with externalNativeBuild and CMake. So far we had the dependencies between ...
marczellm's user avatar
  • 1,346
-1 votes
1 answer
79 views

Prefabs Locations HI, I was wondering, how could I instantiate one prefab (from an array/list) under one of the random red squares! Please help me
Vlad Mihaila's user avatar
1 vote
1 answer
366 views

I am creating a canvas with a table containing TextmeshPro Input fields on a row. I'm using the XR Input System for the Oculus Quest Vr Headset and wish to handle input from the controllers so they ...
Mark's user avatar
  • 194
1 vote
3 answers
2k views

I have created a player prefab (called Tim in my project) and am trying to make all the references to gameObjects and transforms directly from the one of the players scripts which is actually attached ...
SKYZE's user avatar
  • 99
1 vote
0 answers
51 views

In my Unity project, I made a prefab to rendering images from web sources by URL. However, when testing the app, it displayed the images like this: There are two image windows, but you can see, the ...
Chenchen's user avatar
0 votes
1 answer
423 views

Having a spatial anchor as a reference point, I wanted to create an object that does not change its location that reference to the spatial anchor. When creating and saving the initial location of the ...
4ndyg0h's user avatar
0 votes
0 answers
247 views

How do I load an addressable AssetReference dynamically, like a crate or something, via LoadAssetAsync and then reuse it throughout my game without calling LoadAssetAsync again? I am generating a ...
jumpwire's user avatar
  • 101
0 votes
2 answers
370 views

I have just started to learn Unity 2d and I have taken a task at hand where I want to Instantiate a Prefab from Assets folder and then disable some of the child elements in it once the prefab is ...
Rerise Studios's user avatar
-2 votes
1 answer
702 views

I'm not a unity specialist, I'm doing ios development. But I need to build and export the unity model to my project. In the unit itself, I see a mozhel, it is animated, that is, everything seems to ...
rmn rmn's user avatar
1 vote
0 answers
1k views

I bought an asset from unity store and installed XR interaction toolkit therein. Everything works fine. When I drag prefabs from another asset into the scene and deploy it into oculus quest 2, these ...
Craving_gold's user avatar
0 votes
0 answers
289 views

I have prefab enemyRangeAttack and then I add this code for enemy (child of enemyRangeAttack) public class Selectable : MonoBehaviour{ [HideInInspector] public GameObject Player; public float range = ...
NgDat's user avatar
  • 15