Announcements, support questions, and discussion for the Intrigues.
-
psycheer
- Posts: 2
- Joined: Fri Dec 26, 2025 10:07 pm
Post
by psycheer »
Hey there! As said in Subject, I'm new to this asset.
I like the videos, how it could look like etc but I have some problems with it.
On a
fresh installation I've gotten this
after clicking on
"New Culture"
So I cannot complete video tutorial as this is first step in your GUI
Same with
Policies
Hope you will get this sorted and I will have a new system I can play with!
And maybe clean this forum a bit as there are some spams below this post
Whole error
Unity 6.3.2f1
-
psycheer
- Posts: 2
- Joined: Fri Dec 26, 2025 10:07 pm
Post
by psycheer »
I've managed to fix these errors
CultureNode.cs
Code: Select all
private bool openPicker = false; // 1. add this
int currentPickerWindow = GUIUtility.GetControlID(FocusType.Passive) + 100; //2. remove this
icon.RegisterCallback<MouseDownEvent>(evt =>
{
if (evt.button != 0) return;
openPicker = true;
});
icon.onGUIHandler += () =>
{
int currentPickerWindow = GUIUtility.GetControlID(FocusType.Passive) + 100;
if (openPicker)
{
EditorGUIUtility.ShowObjectPicker<Sprite>(CultureIcon, false, "", currentPickerWindow);
openPicker = false;
}
if (Event.current.commandName == "ObjectSelectorUpdated" &&
EditorGUIUtility.GetObjectPickerControlID() == currentPickerWindow)
{
var _sprite = EditorGUIUtility.GetObjectPickerObject() as Sprite;
if (_sprite != null && _sprite != CultureIcon)
{
CultureIcon = _sprite;
icon.style.backgroundImage = new StyleBackground(_sprite);
icon.style.unityBackgroundImageTintColor = Color.white;
SetDirty();
GraphSaveUtility.SaveCurrent();
return;
}
if (_sprite == null)
{
CultureIcon = null;
icon.style.backgroundImage = new StyleBackground(texture);
icon.style.unityBackgroundImageTintColor = new Color(255f, 255f, 255f, 0.5f);
SetDirty();
GraphSaveUtility.SaveCurrent();
}
}
};
PolicyNode.cs - First two steps are the same as above
Code: Select all
icon.RegisterCallback<MouseDownEvent>(evt =>
{
if (evt.button != 0) return;
openPicker = true;
});
icon.onGUIHandler += () =>
{
int currentPickerWindow = GUIUtility.GetControlID(FocusType.Passive) + 100;
if (openPicker)
{
EditorGUIUtility.ShowObjectPicker<Sprite>(PolicyIcon, false, "", currentPickerWindow);
openPicker = false;
}
if (Event.current.commandName == "ObjectSelectorUpdated" && EditorGUIUtility.GetObjectPickerControlID() == currentPickerWindow)
{
var _sprite = EditorGUIUtility.GetObjectPickerObject() as Sprite;
if (_sprite != null && _sprite != PolicyIcon)
{
PolicyIcon = _sprite;
icon.style.backgroundImage = new StyleBackground(_sprite);
icon.style.unityBackgroundImageTintColor = Color.white;
SetDirty();
GraphSaveUtility.SaveCurrent();
return;
}
if (_sprite == null)
{
PolicyIcon = null;
icon.style.backgroundImage = new StyleBackground(texture);
icon.style.unityBackgroundImageTintColor = new Color(255f, 255f, 255f, 0.5f);
SetDirty();
GraphSaveUtility.SaveCurrent();
}
}
};