How to check what prefabs exist in one of the project folders? (not...
Hey all. Just as title says - I need to check what prefabs exist in specific project folder (e.g. "Assets/FunnyFolder/NotFunnyFolder/") I tried using AssetsDatabase and PrefabUtility, but I can't work...
View ArticleHow do I conditionally instantiate gameobject in a public class array?
i have a class called, [System.Serializable] public class EnemyInformation{ //inside are public variables like public int enemyID; public enemyName; } I created another script that inherits...
View ArticleList.FindIndex
How works FindIndex? public class FRef : MonoBehaviour { string player_n; public List p = new List(); int idx; void Start() { idx = p.FindIndex(IsAlive); Debug.Log(p[idx].name); } bool IsAlive(Prop...
View ArticleHow can run method from unknown type of script?
Hi, i have many objects that most of them have a script with 'Events' suffix. example : gameObject : Door, script : DoorEvents then i find this script after triggering player with them: foreach...
View ArticleCan someone plz tell me we're the old enemy models are like the ones in...
Other vids with this model are: My bad fps part 1 (by chromefxffilms) My bad fps part 2 (by chromefxffilms)
View Articlefind a game object in a specific scene
i did check a similar titled topic but i am curious if there is any way for a script in a scene to find a specific game object in another scene and get a reference to it. assume for the moment we are...
View ArticleQuickly find all particles on the scene without using GetComponent
I need to quickly find all particles on the scene without using GetComponent. Perhaps in the engine there is some pool of all existing particles at the moment to have direct access to them? Like...
View ArticleHow do I get closest particle?
Hello, I am currently working on a small project and I am currently stuck as I don't know how to find closest particle. The thing I want to achive here is that enemies will dodge the particles...
View ArticleIssues with dropping an object on multiple objects separetly - Simple 2d Drag...
>Hello,>What I want to achieve is: Drag and Drop the circle in the Start Screenshot on the squares separetly, so you'd drag and drop it on any square, and that square will be destroied, then...
View Articlefind object of with specific conditions
I'm trying to create a card based game and for UI purposes I have specific slots but I need the script to be able to tell which cards are available and for that I need it to only search for ones that...
View ArticleVery basic optimisation question (Find)
Hi. I have a player with its references to its own components like collider/rb in a player.cs script. The thing is, referecing manually in the engine makes it look ugly, and I was wondering : Is...
View ArticleWorking with FindAssets filter.
Hi, i'm working on a unity tool and i need to find an asset named 'Settings.asset'. So I started trying to use FindAssets and I did this: AssetDatabase.FindAssets("Settings t:ScriptableObject") And at...
View ArticleI can't find code that finds a TMP_Pro object by name, tag or whatever.
I'm trying to access a TMP_Pro text on the UI from a prefab that gets instantiated after the start of the game. This means that, in order to change the text of the TMP_Pro object, it needs to "find"...
View Article