Hello.
I added small, but very useful feature to the system.
Now you can define custom drawers for field type.
For example:
I changed few lines in source code, so now there's interface to add your own drawer to field type:
public enum SceneType {
MainMenu,
Fight,
Map
}
[CustomFieldTypeService.Name("Scene Type")]
public class CustomFieldType_SceneType : CustomFieldType {
public override string Draw (string currentValue, DialogueDatabase dataBase) {
if (currentValue == string.Empty)
currentValue = SceneType.MainMenu.ToString();
SceneType enumValue = (SceneType) Enum.Parse(typeof(SceneType), currentValue, true);
return EditorGUILayout.EnumPopup(enumValue).ToString();
}
}
Hope this feature will be useful not only for us and dialogue system developers will add it someday.
I attached all needed files below, so you can use it as reference.
Field custom drawers
Field custom drawers
Hi,
Thank you for sharing this! The forum software doesn't allow certain upload types. I'll try to change that tomorrow. Would you mind emailing the unitypackage file to me at tony (at) pixelcrushers.com?
Thanks!
Tony
Thank you for sharing this! The forum software doesn't allow certain upload types. I'll try to change that tomorrow. Would you mind emailing the unitypackage file to me at tony (at) pixelcrushers.com?
Thanks!
Tony