- Home /
Question by
ErikH2000 · Aug 11, 2019 at 06:08 PM ·
editorguieditorguilayout
How to show floppy disk UTF-16 character on custom inspector button?
There is a nice floppy disk icon in Unicode that I'd like to put on a "save" button. I've been successful showing other Unicode-based icons on the button, but using the floppy disk code, results in blank button with no image/text on it. Maybe there is no support for UTF-16 icons, and they need to be UTF-8 only? Current code below:
[CustomEditor(typeof(Gestures))]
public class GesturesEditor : Editor {
private static GUIContent saveButtonContent = new GUIContent("\U0001f4be", "Save");
public override void OnInspectorGUI() {
serializedObject.Update();
GUILayout.Button(saveButtonContent);
serializedObject.ApplyModifiedProperties();
}
}
Comment
Your answer
Follow this Question
Related Questions
In EditorGUI, how to implement a large Editable Panel like what you can do in an UML diagram? 0 Answers
Setting custom amount of space between elements in a custom inspector with EditorGUILayout ? 1 Answer
Is it possible to store and display EditorGUILayout.Toggles? 0 Answers
EditorWindow: Use toggle to disable/enable other controls? 1 Answer