Is there way to get the missing image name directly?
Missing Sprite
Go to image inside your project files, click on it and in Inspector you will see Texture type property. Check if it is set to Sprite (2D and UI) since by default when you add image it is set to default and some unity components can't see it.
Related
I'm a Unity nob, so please don't flame me for this question.
I'm trying to change a simple UI button to look like a Play button (via simple Play PNG image), I see that the Button have a Source Image under the Image script, but as far as I can see I must select a Sprite.
How can I create a Sprite from a PNG Image?
Unity's sprite is a kind of Texture.
Import your PNG by drag your file to the Project panel, Unity will automatically generate texture for you.
Click on that file, The Inspector panel will show texture's Import setting.
In Inspector, Choose texture type as Sprite (2D and UI), Hit Apply at the bottom.
In Project Panel, Drag this texture to your Source Image under Image Script
I need to change the background color of the SimpleDraweeView, is there any functions I could use to do this? SetBackgroundColor ignores the circular shape.
<com.facebook.drawee.view.SimpleDraweeView
android:id="#+id/message_status_image"
android:layout_width="#dimen/medium_icon"
android:layout_height="#dimen/medium_icon"
fresco:backgroundImage="#color/grey"
fresco:placeholderImage="#drawable/ic_linked_white"
fresco:roundAsCircle="true" />
Changing background image dynamically is not supported at the moment. What you can do as a workaround is build a DraweeHierarchy programmatically as explained in the documentation, and set a custom Drawable for the background. Keep a reference to that drawable so that you can access it later on.
Instead of a custom drawable, you can simply use the existing RoundedColorDrawable and when you need to change the color you just have to do mBackgroundDrawable.setColor(color).
Does an image have to be a specific type, so that you can simply drag it from a folder in a Unity project and drop it on top of the Source Image field of the Image component of a UI element, such as a Panel?
I try to do this with a jpg logo, in order to apply it to a Panel element, but it would not apply...
Navigate to the .jpg file within the Unity Editor and select it so that the details appear in the Unity Inspector panel, then change the Texture Type to Sprite (2D and UI). This new Sprite element can now be assigned to the Source Image field of the Image component.
I'm using the Ajax v.7 version of Bing Maps and want to change the pushpin icon.
I don't want to create new icons nor I want to draw on the canvas.
Is there a way to get some predefined puspins or to change the default one color.
the default one is: http://ecn.dev.virtualearth.net/mapcontrol/v7.0/7.0.20140904153057.64/i/poi_search.png
so i assume there must be others, but how to get them?
thanks
To change the icon you need to either use a URL to an image. Or hide the icon all together and use HTML instead (HTML 5 Canvas, SVG, and symbol fonts all work well). If you have a specific type of pushpin icon you want to create and/or function (i.e. be able to change color), let me know and I'll provide ore details.
I'm currently working on a puzzle game project in Unity3D and when I'm trying to assign a new image in script in the inspector view, it is still reading the old image by default. But the the field now has updated to new image name, and if I delete the old image, it is not showing up any image at all, just a gray color object.
What's wrong?
This is the image of the inspector view
The gray color means there is no image defined for that object. Try to make sure you have the reference to the image setup. Also try to reopen the scene to see the reflected changes.