Importing Textures not working quite right with LoadAssetAtPath?
Hi AllIam trying to import textures manually from a text file with the code:Texture2D ImportTexture(string path) { string destpath = System.IO.Directory.GetCurrentDirectory() + "/";...
View ArticleUnexpected behaviour with LoadAssetAtPath
I am found this slightly annoying thing with LoadAssetAtPath when I create a prefab, and then attempt to link that prefab to another. This bit of code should explain what I'm doing... ----------...
View ArticleScriptableWizard Problem with LoadAssetAtPath
I'm getting error messages when trying to use this bit of code in a C# editor script - ScriptableWizard. The code is from the Unity script reference for "EditorUtility.InstantiatePrefab" I'm new to...
View ArticleAssetPostprocessor reference to asset being processed?
I wrote this class to streamline import settings on a bunch of UI textures. In addition to setting import settings, I want to create a material for each texture. This works great if I use "Reimport"...
View ArticleChange material with EditorScript
I try to change the material of a gameobject in the editor by a EditorScript. I use this code: if(boolean == true) { var newMat = AssetDatabase.LoadAssetAtPath("Assets/blue.mat", typeof(Material));...
View ArticleResources.LoadAssetAtPath not working in WebBuild
I'm using the following loop to grab files for an animation. This method makes it really easy for our artists to export animations from flash as PNG sequences. It works perfectly fine when run from...
View ArticleAssetDatabase.LoadAssetAtPath() not working after any sort of project change.
I have created a class which holds data about an object, which looks like the following: using UnityEngine; using System.Collections; using System; using System.Collections.Generic; [Serializable]...
View ArticleLoadAssetAtPath
I cant get this to work right for some reason. I have tried Resources and AssetDatabase to run this from but keep getting a null object from it. This is in editor and not runtime. importPath shows up...
View ArticleHow to change the image (texture) of a GUITexture in C#.
I am making a game, and the player has multiple weapons, and I want to display which weapon is being used. I made two pictures to show which picture is being used. But I have no idea how to make it...
View Articlecapturing screen shot, and showing the captured image on screen
Hiii everyone, I have the requirement of capturing screen shot, saving it and accessing to show it on screen. How can I do this? please help out this new bee.... Thanks in advance
View ArticleLoading texture2d by script null instance
Im trying to load a texture2d with c# at Start() I've seen several instances about using Resources.Load but i wasn't able to load it because i keep getting this message that the texture has to be...
View ArticleI cannot load an asset in web player with instantiate
Hi i a very new to unity, I have a problem with instantiate in web build. I cannot load an object in web player. When i try to load it in editor it loads perfectly. This is the code that i use if...
View ArticleHow to implement Live In game billboard ads
Hey Friends, I am new to unity. and I have assigned with the work to make in game live billboards ads. By live I mean on every time we play game we can have a different ad. Can anyone plz guide me on...
View ArticleAndroid texture AssetBundles loading problem
hi everyone, I'm trying to load images from an assetbundles but when I load the texture in the scene the image appear broken, I post the link at the file that I used to see if the problem is caused...
View ArticleLoad gameobjects in-game
Hello. I would like to know, how to make the models (paint texture, trees, grass, ...) show up in a list in an in-game editor to choose from and then be able to place and position them on the map. Most...
View ArticleLoadAssetAtPath() returning null IN EDITOR
Hello, I've searched and searched and mostly find people trying to use it for runtime stuff with builds and getting null. Well, I'm getting null from within the editor. **No play mode involved**. I...
View ArticleLoading an asset bundle is null on second load
Hi, I use the following code to load an asset bundle from disk: AssetBundle.CreateFromFile(path); This works first time I run this code, but if I try to load the same asset bundle later (while the...
View Articlecannot load GameObject Prefabs using Resources.Load in Android
I have gameobject prefabs in resources folder that needs to be replaced using PrefabUtility.ReplacePrefab. Its working the way I want it to when I play it on Unity, but not when I build&run on my...
View ArticleCould not load copied asset via AssetDatabase.LoadAssetAtPath
I am using `AssetDatabase.CopyAsset` method to create a copy of a prefab as part of an `AssetPostProcessor` implementation: AssetDatabase.CopyAsset(sourcePrefabLocation, targetPrefabLocation);...
View ArticleChange UI Image through a script with AssetDatabase.LoadAssetAtPath
Hi, I'm creating a battle interface for my game on which every turn different cards are chosen randomly and displayed to the player. So I generate a random number bewteen 0 and 9, since I have 10 cards...
View ArticleLoad an asset right as it is imported?
Heyo! Alright, so I'm working on an asset that people will be able to import into their project. To keep my question simple, I'll only mention the important parts. I have a script that is using...
View Article