Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
this是BaseUnityPluging派生类
另一个可行的方法就是检查是否有这个mod,然后通过反射调用你的函数, 但我觉得这个更麻烦。
不过引用也行吧,单独建个文件隔离一下,先检测是否有ModConfigGUI,有的话再调用那个文件里的方法,就不必须作为前置了
(这个操作在dnspy上好不好做我就不知道了
哦,你的是用反射改BaseUnityPlugin.Config吗
如果是的话,那确实有点烦人了...
我对用dnspy改没有概念
不过能用反射改就行,也挺方便(我是这么觉得的
手动注册就两行,考虑要判断软件包是否存在也就单独建个文件隔离一下
if (ModManager.ListPluginObject.OfType<BaseUnityPlugin>().Any(plugin => plugin.Info.Metadata.GUID == "me.xtracr.modconfiggui"))
LayerBuilder.RegisterDefaultBuilder(ModGUID, ModName, configFile);
应该还算方便
自动绑定?本身就是自动的,很多mod的ConfigFile都是自己new的,不是直接用的BaseUnityPlugin.Config属性,这种我拿不到,只能mod作者手动注册
workshop\content\2135150\3379819704\README.md里有写怎么手动注册
不过之前确实描述里写得不太好,稍微改了一下
It should be fixed now.
这似乎是GUI入口点生成失败导致的。
出现问题时你的Mod Viewer中的最后一个mod是什么?
最好能把错误日志也发给我
This seems to be caused by a exception in GUI entry point generation.
What was the last mod in your Mod Viewer when the problem occurred?
Better yet, send me the error log as well.
Visually this results in all of the local mods disappearing from the list as well as some of the workshop mods.
From there on ..exiting the mod viewer is impossible via normal means and one has to ALT+F4 .
Disabling the Mod Config GUI mod results in everything showing up as normal & being able to exit the mod viewer as normal .
这个问题不难解决,但我的解决方案有点丑陋:
在LayerTitle.OnInit()的末尾添加补丁,在进入世界前初始化UIHelper,这样复制Layers(Float)的时候就不会把LayerInventory等窗口一并复制了
This isn't hard to fix, but my solution is a bit ugly:
Add a patch to the end of LayerTitle.OnInit() to initialize the UIHelper before entering the world so that when copying Layers(Float) it doesn't copy LayerInventory and other windows along with it
[HarmonyPostfix]
[HarmonyPatch(typeof(LayerTitle), "OnInit")]
public static void Oninit_Postfix()
{
UnityEngine.Object.Destroy(Layer.Create<LayerMod>().gameObject);
UIHelper.Init();
}
鉴于它暂时没什么影响,我就先不这么做了
Since it doesn't seem to be harmful, I'll leave it as it is for now
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00009] in <7e05db41a20b45108859fa03b97088d4>:0
at UIInventory.get_owner () [0x0000a] in <2119054204a4433093b57a78b9b90a5a>:0
at LayerInventory.OnDestroy () [0x0001a] in <2119054204a4433093b57a78b9b90a5a>:0
UnityEngine.Object:DestroyImmediate(Object, Boolean)
UnityEngine.Object:DestroyImmediate(Object)
ClassExtension:DestroyChildren(Component, Boolean, Boolean)
ModConfigGUI.UI.UIHelper:ReplaceComponents(Layer)
ModConfigGUI.UI.UIHelper:AddLayer(ILayerBuilder)
ModConfigGUI.Patches.<>c__DisplayClass1_1:<CombineActions>b__2()
It supposed to say “Changes have not been saved yet. Save?”, instead of "NotSaved".
This is actually a localization id, because the worksheet name for EN.xlsx is “General)”, with an unexpected bracket......
Fixed.
Thank you!
Also small thing but when exiting the menu without saving it says "NotSaved", maybe change to "Do you wish to save?"
Thanks again!
I set characterLimit to 0, there should be no character limit now.
switch (inputType)
{
case Dialog.InputType.Password:
d.input.field.characterLimit = 8;
d.input.field.contentType = InputField.ContentType.Alphanumeric;
break;
case Dialog.InputType.Item:
d.input.field.characterLimit = 30;
break;
case Dialog.InputType.DistributionFilter:
d.input.field.characterLimit = 100;
break;
}
Maybe it can give you an hint why yours is 24 max.
Seems like there's a character limit on string fields
"123456789012345678901234", so only 24 characters are supported somehow.
Can this be increased? I don't think there's any pratical limit on string sizes.
If I put 100 characters on the config file, when loaded Mod Config GUI also only shows 24.
Thanks again for the great mod!
我记得确实是会有这个报错的,虽然没看出来有什么影响。
但是今天发现不报错了,也不知道为什么
我正想解决它呢...
I remember that it did throw errors like you've said, although I couldn't see anything wrong in the game.
But today I found that it didn't throw errors, and I don't know why.
I was just trying to fix it...
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Also, I'd suggest to add a feedback sound or something (maybe change button text from "save" to "saved") when a setting is saved as the button doesn't give any feedback.
It applies without a restart.
I have a suggestion:
https://i.ibb.co/NjTrppj/image.png
Try to put an option in the ESC menu > Tools and show only mods that have configurations available, so it's easier to find what you need to change.
But really this is great, now modders don't need to go through the trouble of having their own menus!