#UITK for KSP 2
1 messages · Page 2 of 1
there you go @cyan terrace
I dont see it
do you have your CKAN set up to download the newest mod lists on every launch?
yes
weird
restarted it a few times
it showed up for me instantly after the PR was merged
strange
are you using the UITK nuget package?
no im using the dlls
could you try with the package please?
I know it's working for me for SpaceWarp and my testing mod
but I'd like some more data anyway
not really since I keep everything in a central location to save space.
unless I can configure nuget to use 1 location for all the mods
I mean
that's literally what it's for
you have 1 folder with all cached packages
C:/Users/<username>/.nuget/packages
can you send me the xml config for it
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
<ImplicitUsings>true</ImplicitUsings>
<AssemblyName>com.github.jan-bures.UitkTestMod</AssemblyName>
<Product>UITK Test Mod</Product>
<Version>0.1.1</Version>
<RestoreAdditionalProjectSources>
https://api.nuget.org/v3/index.json;
https://nuget.spacewarp.org/v3/index.json
</RestoreAdditionalProjectSources>
<RootNamespace>UitkTestMod</RootNamespace>
<ModId Condition="'$(ModId)'==''">uitk_test_mod</ModId>
</PropertyGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp">
<HintPath>..\external_dlls\Assembly-CSharp.dll</HintPath>
<Publicize>true</Publicize>
<Private>false</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="BepInEx.Analyzers" Version="1.*" PrivateAssets="all" />
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.0" PrivateAssets="all" />
<PackageReference Include="BepInEx.Core" Version="5.*" />
<PackageReference Include="BepInEx.PluginInfoProps" Version="2.*" />
<PackageReference Include="HarmonyX" Version="2.10.1" />
<PackageReference Include="SpaceWarp" Version="1.1.1" />
<PackageReference Include="UnityEngine.Modules" Version="2020.3.33" />
<PackageReference Include="UnityEngine.UITK" Version="2020.3.33" />
<PackageReference Include="Ksp2Uitk" Version="0.3.0" />
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="rm -rf "$(ProjectDir)..\$(ConfigurationName)"
echo d | xcopy /y /s "$(ProjectDir)..\$(ModId)\" "$(ProjectDir)..\$(ConfigurationName)\BepInEx\plugins\$(ModId)\"
echo f | xcopy /y "$(TargetPath)" "$(ProjectDir)..\$(ConfigurationName)\BepInEx\plugins\$(ModId)\$(ModId).dll"
if $(ConfigurationName) == Debug echo f | xcopy /y "$(TargetDir)$(TargetName).pdb" "$(ProjectDir)..\$(ConfigurationName)\BepInEx\plugins\$(ModId)\$(ModId).pdb"
xcopy /y "$(ProjectDir)..\LICENSE" "$(ProjectDir)..\$(ConfigurationName)\BepInEx\plugins\$(ModId)\"
echo f | xcopy /y "$(ProjectDir)..\README.md" "$(ProjectDir)..\$(ConfigurationName)\BepInEx\plugins\$(ModId)\README.txt"" />
</Target>
</Project>
this is the .csproj for my testing mod
you need at least the <RestoreAdditionalProjectSources> element and the <PackageReference>s
I like this way more than .dlls since I only need to copy the game's DLL this way and everything else is handled and versioned using Nuget
@stuck jasper is there an Unity.Addressables package?
there isn't, neither on BepInEx nor on SpaceWarp nuget servers, but I can definitely add it for you
that fixed it, but that still does not answer why the DLLs was not working.
no idea, I was using the DLLs for a long time and never had that issue
would be good for any mod that loads files by themselves through addressables
I assume S.T.A.G.E was also using the DLLs fine?
not that adding the .dll is hard, not at all i was just wondering just realized, wrong chat, sorry
yes but updating to the one on ckan broke everything on that as well
interesting, the UnityEngine files themselves haven't changed at all
I mean the only difference in the library's files compared to the ones inside the game's folder is that the library DLLs are publicized
but that should just mean you have access to more stuff
not less
though the Window.CreateFromElement method won't work if you reference the old ksp2_uitk.dll
since the API changed slightly in 0.3
yes as I said its using the one from ckan
both the UnityEngine dlls and the ksp2_uitk one?
yes
double check
alright, did a fresh download from both Nuget and CKAN and comparing the individual files
the ksp2_uitk dll is exactly the same
and the lib/UnityEngine.xxx.dll files are the same except for the access modifiers
which is what I already said about the publicizer stuff
where exactly did you get the .dlls that previously worked for you? https://github.com/jan-bures/Ksp2Uitk/releases/tag/v0.2.0 was it from the 0.2 GitHub release from a few weeks ago?
I mean I assume so since that was the first one that included the Element and Window classes API
and if that's the case, then I can confirm the lib/UnityEngine.xxxxx.dll files are exactly the same there as in the 0.3 release on GitHub/SpaceDock/CKAN
I would also assume that to be the one.
yeah then I have no idea where the issue is
its odd. I copied them from the mods folder to my central source again and same issue
actually I had a similar issue before, which was the whole reason why I decided to make the Nuget package, but I don't think that is your case
I was using the <PackageReference Include="UnityEngine.Modules" Version="2020.3.33" IncludeAssets="compile"/> nuget package from the BepInEx nuget feed
and it was interfering with local .dll references for the UITK dlls
but having either both as dlls or both as packages works fine
I assume you just had copies of all the game's DLLs in your central source and then copied over the UITK ones and replaced the game ones with them?
since in that case the issue is not that
yes
yeah, then I really have no idea
im using the nuget now but still
going to quickly swap countdown to uitk and see if the dlls are going to be any issue when running the game
sure
I was having some issues with correctly getting font assets to load when they're in one bundle and they're referenced inside another bundle's .uss file but I think I solved that, all my tests worked
and you're not using bundles and .uss styles anyway so it shouldn't affect you at all
not yet anyway. until I can find a way to do bundles without opening unity
I doubt that thats easy
You'd have to learn meta files and all that as well
well, that's probably a very long way off, we'd have to write a full custom parser for UXML and USS, since Unity compiles those in the Editor and puts the compiled versions into the bundles
I also dont want to use a custom parser as that will be slow
making the bundle itself is the easy part here
even Asset Studio can do that
but not the parsing/compilation
yeah, then I'm afraid there's no other way than using Unity for now
they did say that they'd like to add support for UXML/USS loading at runtime, but they have no specific plans for it yet, and it will likely be only supported in games using Unity versions starting from the version in which they implement it (if they do at all), not 2020.3.33 which KSP 2 uses
I think I just directly copied over the one you sent me?
its jumping all over the place
oh yeah I noticed that too in my testing mod, it seems to work just fine when using it with Window.CreateFromUxml(...) using a .uxml loaded from a bundle
but when using Window.CreateFromElement, it was acting weird and jumpy
I will swap to my one then
I apply it to each window that requires it like this
and the window is the return value of Window.CreateFromElement(...)?
oh
that should be the same way that I do it then
Element.Root(isDraggable: true);
// where the Root method is:
public static UnityEngine.UIElements.VisualElement Root(
string name = null,
string classes = null,
IEnumerable<UnityEngine.UIElements.VisualElement> children = null,
bool isDraggable = true)
{
UnityEngine.UIElements.VisualElement ele = Element.VisualElement(name, classes, children);
ele.AddToClassList("root");
if (isDraggable)
ele.AddManipulator(new DragManipulator());
return ele;
}
it just adds the manipulator before the root element is returned, not after
shouldn't change anything
this is very much a "works on my machine" situation.
yeah lmao
my code works fine but when I use your one it breaks, even tho its the same
how the fuck
let me quickly test the way you do it lmao
no change, still buggy
and you can see the SpaceWarp mod list which is loaded from a bundle works just fine
I see progress on the mod list :3
not really, I haven't done any new work since this progress update: #🔴space-warp message
I'm a bit stuck on that
namely we ideally first need to make the click through blocker (I do have 3 different ideas of how to make it, but no specific implementations yet)
the click event issue shouldn't be too difficult to solve but I haven't been able to do it so far
and as for the colors, I'm still waiting for the dev responses and hoping we get something helpful for that
Jesus Christ on a stick
I set it to false and removed my one
yes
I apply it both in Element.Root and Window.CreateFromElement
ffs
well, 0.3.1 coming in a few minutes
lol
thanks for helping debug that btw
I kinda just forgot about the issue until now

love having a personal beta tester lmao
smh. tbh you should just let the modder add it them self rather than it be a default true
I guess at the very least I can make the default false
so that the API doesn't change in a patch version
that would be good
well, actually since I'm already making an update, I'll also rename the .dll files to fit with the CKAN naming scheme
aka BepInEx/plugins/ksp2_uitk/ksp2_uitk.dll to BepInEx/plugins/UITKForKSP2/UITKForKSP2.dll
I'd rather do it sooner than later
before more people start using it
good
they recommended it
will it remove the files that it had installed in a previous version of the mod?
More like its gonna just cause an inflation issue (i think thats the term)
Not sure
who knows, ckan runs on dark magic ¯_(ツ)_/¯
I'll just ask HebaruSan in the comments on the PR where we discussed this earlier today
let me know when you update the nuget so I can continue with this update
will do, I'll just wait for the answer and then do it asap
well actually for the Nuget package itself I don't even need to wait
so I'll do that right now
sure
I will continue in a few hrs.
.
Just
ClickThroughBlock();
@stuck jasper the error still happens
System.TypeLoadException: Could not load type of field 'ShadowUtilityLIB.UI.Manager:<Windows>k__BackingField' (1) due to: Could not resolve type with token 0100002b (from typeref, class/assembly UnityEngine.UIElements.UIDocument, UnityEngine.UIElementsModule, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null) assembly:UnityEngine.UIElementsModule, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null type:UnityEngine.UIElements.UIDocument member:(null) signature:<none>
at SpaceWarp.Patching.LoadingActions.InitializeModAction.DoAction (System.Action resolve, System.Action`1[T] reject) [0x00000] in <903e43f16c5745be9d0911dfe1510a8f>:0
with the nuget package?
yes this is from the BepInEx log
i thought the error happened at compile time before, not at runtime?
did you delete the old Ksp2Uitk folders in the game and install the new ones?
yes
including in the patchers folder
I have now
could it be that Shadow lib is getting loaded before UITK?
also isnt this the same isse that the guy was having earlier with referencing other assemblies?
it should have [BepInDependency(...)] defined
does it?
this was why lol
no lol
good
and it definitely should
to make sure UITK loads before the lib does
it never uses any of the mod
if you never use any of the UITK library then why do you need it?
because the mods that use shadow lib use the namespace ShadowUtilityLIB.UI stuff that uses using UnityEngine.UIElements;
I'm talking about the library defining a dependency on the UITK mod
thats all after every mod is loaded
UITK is required as it adds UnityEngine.UIElements;
yes, and a situation can happen where ShadowUtilityLIB starts getting loaded by BepInEx before UITK does
which would result into an error
that's why the dependency definition is important
that wont error as the UI stuff only is used after loading is done
it probably happens, i think it loads by alphabetical order
it doesn't matter where you use it, if your code has any references whatsoever to it
we literally had that same lengthy conversation yesterday with schlosrat and his soft dependency
hey @stuck jasper, everything works. conversion went good.
🙏
just waiting for this before I push https://github.com/KSP-CKAN/KSP2-NetKAN/pull/40
Few questions.
- I set the background color to transparent, how do I change them other colors. such as hover, I dont see them in the style list.
- how do I fix the manipulator, the component was added after.
@stuck jasper ^
good question, I haven't used the C# approach to building UI at all so I have no idea how styling works there, need to go research online
ok will take another crack at it tomorrow then.
from all the mentions of this I could find, it seems you have to use events
which sucks
what the fuck, all I want to do is set the color to none
also that goes to a china site, an I blocked all of china rip
oh yeah lmao
they have a separate Chinese site because of some local laws or whatever
and it often pops up in Google searches before the global one

not sure if thats even what I need. I dont see it interacting with the hover color value
there's no hover color value
I cant access :hover it seems
they just update the regular color style on hover
and then set it back when the pointer is not on the element
looks like im going to have to add some custom reflections to shadowlib
myElement.RegisterCallback<PointerEnterEvent>(evt =>
{
(evt.currentTarget as VisualElement).style.backgroundColor = Color.clear;
});
myElement.RegisterCallback<PointerLeaveEvent>(evt =>
{
(evt.currentTarget as VisualElement).style.backgroundColor = //original color;
});
that should be what you need
or that
that's literally what I just wrote
I will probably add something like this to shadow lib
no the one I sent edits the :hover
It sends me to that text
are you using chrome or firefox
will test that stuff tomorrow
oh lol
I just finished reading the code
it does in fact not edit any styles
nor does it allow you to
it just adds a custom way for setting the :hover state on an element
but you still don't have any way to style it
Noooooooooooooooooooooooooooo
the pseudoclasses just don't have their own styles
it's done dynamically
like in the code I wrote
it's just abstracted away nicely in USS
I can add an API for setting pseudoclass styles, but it will just use events in the background anyway
Still happens
so I looked deeper into it and TextField has an embedded textInput so doing this fixed it
alright, good to know!
you dont need the event stuff
just this by its self works
textField.textInput.style.backgroundColor = new StyleColor(new Color32(0, 0, 0, 0));
Still need to try and fix the drag manipulator issue
Making a new drag manipulator with a definable deadzone.
it's weird that it happens in the first place though
shouldn't the call to target.CapturePointer(evt.pointerId) make it so that the cursor "can't" leave the element?
yes
well the deadzone works
using UnityEngine;
using UnityEngine.UIElements;
using Logger = ShadowUtilityLIB.logging.Logger;
namespace Notebook.UI
{
public class DragManipulator: IManipulator
{
private Logger logger = new Logger(NotebookMod.ModName, NotebookMod.ModVersion);
public VisualElement _target;
public Vector3 offset;
public PickingMode Mode;
public bool Dragging = false;
public Vector2[] deadzone = new Vector2[0];
public VisualElement target
{
get => _target;
set
{
_target = value;
_target.RegisterCallback<PointerDownEvent>(DragBegin);
_target.RegisterCallback<PointerUpEvent>(DragEnd);
_target.RegisterCallback<PointerMoveEvent>(PointerMove);
}
}
public void DragBegin(PointerDownEvent evt)
{
if (evt.localPosition.x >= deadzone[0].x && evt.localPosition.x <= deadzone[1].x && evt.localPosition.y >= deadzone[0].y && evt.localPosition.y <= deadzone[1].y)
{
logger.Debug($"drag is in deadzone");
}
else
{
Mode = target.pickingMode;
target.pickingMode = PickingMode.Ignore;
offset = evt.localPosition;
Dragging = true;
target.CapturePointer(evt.pointerId);
}
}
public void DragEnd(IPointerEvent evt)
{
target.ReleasePointer(evt.pointerId);
Dragging = false;
target.pickingMode = Mode;
}
public void PointerMove(PointerMoveEvent evt)
{
if (Dragging)
{
Vector3 delta = evt.localPosition - (Vector3)offset;
target.transform.position += delta;
}
}
}
}
if you want to make a deadzoneable one heres the code.
to apply it all you do is this.
Currently trying to get a way to find the current XY position of a component so I can make dynamic deadzones
so far not had good luck
I'll try to look into it once I get to a PC
the only thing that outputs a position is yourVisualElement.worldBound and thats the world position, useless for doing stuff with child elements where you need the local. local gives you 0
how do i do this? i want to change the TextInput Text size
like not the font size, the width of the item
you need to write some USS for it
oh ok, wtf why would it be locked under a new template?
what do you mean?
this is like HTML and CSS
you have one file for markup and one for stylesheets
Oh yeah i thought u was saying i have to modify th stylesheet for that
you can look at Theme/KerbalUI.uss at how I use the styles
basically let's say I want to edit the styles of the tracker part of a scrollbar inside a scroll view
this is the full hierarchy where #modlist-scrollview is my ScrollView element
so I would do something like this:
#modlist-scrollview .unity-scroller .unity-base-slider__tracker {
/* my styles */
}
and you can find those class names in the inspector when you click on the individual elements in the hierarchy
it's not the most intuitive thing but basically I just go for the simplest possible selector with enough specificity to override the defaults lmao
oh btw to get the full KSP window look, your root VisualElement needs to have the .root class
how tf do i do it? The whole thing is a template
Oh ok i wondered why it wasnt working lmao
yeah, sorry, I haven't really bothered making a documentation yet because I expect a lot will still change
it's kinda all hanging on whether the devs respond to my question or not
so I've been waiting for that
oh lmao yeah i imagine
tho is there any way to add that on UITK?
ie a foldout template has the "Text" and "Value"
I'm not sure I totally understand
I mean I kinda know what you're asking but I don't really get the use case
would you maybe mind hopping into vc for a sec?
i cant rn i'll go grocery shopping in a bit lmao
its mostly IE if i want to make the label bigger and the inputs label (XYZ) smaller to add more contrast between then
then i just set LabelFontSize to 20 and InputLabelFontSize to 10
since labels aren't really automatically (else i could use just a 100% on Size.Height)
why not just give them classes and set those values in the USS?
that might work lmao yeah, thx!
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" noNamespaceSchemaLocation="../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
<Style src="ModListItem.uss" />
<ui:VisualElement class="mod-item">
<ui:Label class="mod-item-label" />
<ui:Toggle class="toggle mod-toggle" />
</ui:VisualElement>
</ui:UXML>
for example this is the full UXML for an item in the mod list
I dynamically instantiate this for each item in the list and assign the correct values to the label and toggle
and the ModListItem.uss file has all the styles based on the mod-item, mod-item-label and mod-toggle classes
basically with UITK you have to think like a web designer
im guessing you cant retroport features right?
it seems like theres already an editor for Animation Curves
i wanted to use that
or atleast an API that will make it easier to add an Animation Curve editor
tho this is fan, and it will look prettttyyyyyy
basically, Label will be partName, then you select a mesh on that partName (only will be listed the ones with the LFO module)
on select you get the infos, and each will have its way of editing (or not)
from top to bottom
- Information - for info like State, Seed, etc
- Button - to trigger something
- Vector2
- Vector3
- Color - will open a color selecting GUI with swatches and Hex, RGB or HSV inputs (this might take a while to add, so i'll just start with the Hex)
- Toggle
- Animation Curve - Will open an animation curve editor where u can add Keyframes and adjust its time and value
- Texture Selector - Will open a texture selector window with texture's previews and maybe a search function
- Slider - for things like opacity and to test different Thrust and Atm
sadly
oh :/ i guess i'll have to make one myself
yep
tbh I have a hard time understanding the whole nature of Unity packages
it doesn't make much sense to me
they act as if they're completely decoupled optional features which you can install into any version of Unity Editor, and to some degree they are
yeah thats how i see them
they have their separate versioning scheme, you can use the same version of a package across different Unity versions
but then the majority of the features in the package actually depend on the actual version of Unity
like wtf
choose one or the other, not both

heh maybe they just coudlnt bother with going to older versions to do the needed changed for it to work
probably that only happens to deprecated versions at the time that they develop it?
ie they developed Vector API when 2019 was already deprecated
yes, but it doesn't even work with 2021 which is in long term support
so they only add package features to the newest upcoming versions of Unity as far as I understand it
I just don't understand why they don't either a) make the package features completely independent of specific Unity versions (the package as a whole could still only be supported in specific versions, but not this bullshit where package version 19.1 works on 6 Unity versions but feature X only in 2021+ and feature Y only in 2022.1+, etc) or just b) make the packages completely dependent on the Unity version and don't do a separate versioning scheme and selective feature support
it's just dumb and not transparent at all
maybe if they just hmm
work with the oldest LTS maybe???
cuz im pretty sure that if they do that, any LTS or normal version after that will also work with the package
but they don't
they added the Vector API to 2022 when it was still in beta and 2021 was the actual latest released version
1 use for the thing i mentioned earlier
i want to change the FieldName to Throttle but i dont want to remove the instance reference
so that i can change then instance and it will update all changes except the FieldName content
no way to do this?
its ok lmao
ok so
i have the template for the sliders, as you can see i have 2 there, the 1st one is an instance of a template
i wonder if there's a way to add a "variable" to the template that i can change only for this instance
Bindings is what you want.
yeah seems to be that? probably let me test
exactly this!
this will take some work since i have to build the UIs in code but it will be worth it i think
@stuck jasper so... toggles
are they not setup like KSP2 where its the big grey/green button?
as you can see this is the toggle default component with the theme
the current UI is based on the action group manager
you need the toggle class on it
it was because other parts of the UI use toggles in the background, such as the foldout
and this was the easiest way to separate the two
I mean ngl it still kinda looks like shit, but very accurate to how it's in the game lmao
yeah i find it way too bright lmao
can i target another c# version PLEASE
im on assembly-csharp so idk if i can
but god those features are being missed rn
how tf do i do it?
what do you mean?
oh yeah I don't think Unity supports higher language level features sadly
yeah, C# 9 support came with 2021.2
i cant stress how much i like UITK
this looks so good and with so little effort
also will be pretty easy to implement
i lvoe experimental version of UITK
i add item to foldout, foldout doesnt update the size
that's weird, haven't encountered that yet
might have to do with me settings a background texture via code
but i want to add texture previews so i need to do that
the texture is has its size, but the unity-content doesnt update
you need the element that uses the texture as a background to have the height set
texture sizecontent size
it has!
i do element.StretchToParentWidth()
and then element.style.height = element.resolvedStyle.width * widthToHeightRatio
thus width being auto but height being set
float widthToHeightRatio = texture.height / texture.width;
AddToClassList(ussClassName);
textureContainer = new VisualElement()
{
name = "lfo-texture",
};
//textureContainer.style.backgroundImage = new StyleBackground(ColorField.GenerateColorGradient(Color.red));
textureContainer.style.backgroundImage = new StyleBackground(ColorField.GetHueGradient());
textureContainer.AddToClassList(ussTextureContainerClassName);
textureFoldout = new Foldout()
{
name = "LFO-textureFoldout"
};
textureFoldout.Add(textureContainer);
textureFoldout.AddToClassList(ussFoldoutClassName);
textureFoldout.RegisterCallback<GeometryChangedEvent>
(
evt =>
{
textureContainer.StretchToParentWidth();
textureContainer.style.height = textureContainer.resolvedStyle.width * widthToHeightRatio;
}
);
ValueContent.hierarchy.Add(textureFoldout);
it has to be set via that callback else it wont update since the widht and height is only calculated on the 1st frame and not in the initializer
already tried textureFoldout.MarkAsDirty() and no luck
coming back here for some better segregation of the content
this forces the UI to be in gamma space
if you add this to "Packages/com.unity.ui/Shaders/UIE-Runtime.cginc"
and package it it should work
if it doesnt then i'll write the ^2.3 thing
but this should be the "right" way to do things
actually let me clone your repo
great package manager is doing its thing....... it doenst load so i cant install uitk
lol
can you build with that @stuck jasper ?
doesn't seem like anything has changed
fuck
aight i'll do the testing on my computer now
btw whats the version of spacewar that has that ui?
1.2
it's all finished other than the Colors patch thingy
I can send you a build if you don't want to compile it yourself rn
btw the way I approach the injection of the shader is just adding the default shader and the updated cginc file into my Assets folder in the SpaceWarpUI project, changing the #include path inside the shader to match the updated cginc file, then I just assign the shader to the kerbalui asset bundle, and then in the UitkForKsp2 project I load the kerbalui bundle and load the PanelSettings from it as usual, and then I also load the updated shader from it, assign it to PanelSettings.m_RuntimeShader, and register it to be used with the patched Shader.Find() method to be returned when Hidden/UIE-Runtime is requested
if you see any mistakes in that approach, feel free to correct me, but I'm pretty sure it works, because when I accidentally was assigning null to the PanelSettings and Shader.Find, I kept getting a spam of errors and no UI showed up, so I'd say that I'm putting it in the right places
its wierd because it should have worked... i'll try to remove all color from the shader
well that's weird, and you have the UI Toolkit package installed?
oh yeah duh, I have it in manifest.json
i'll try a reinstall maybe? idk
you can try
but in the worst case scenario, just delete the .cs files
they're just for in-editor testing
oh ok yeah cuz the used ones are on spacewarp
yeah
u use Thunderkit to build the asset bundles right?
forget just saw the "build asset bundles" on the context
yeah
it's just the default script from Unity docs
though I have absolutely 0 idea why this isn't something that's built-in
no change, im guessing its not this shader
hm
in the cginc file there's this #include "UnityCG.cginc"
maybe something in there?
or would that not matter with the test you did?
it wouldnt
the Runtime is suposedly the last one being called before showing the pixel
i wonder if UE shows the material used on uitk?
so how the hell does one figure out which shaders are being used to render something 
also why does it need this shader to exist?
because something in UITK calls Shader.Find("Hidden/UIE-Runtime") multiple times
can very well be a "back bone" for it
hm
actually from what i see
this is fun
this is mostly a "is it text or not" shader
UIE_FRAG_T color = (isText && _FontTexSDFScale > 0.0f) ? texColor : texColor * IN.color;
this is what the cginc returns on the frag (basically the Main() of hlsl)
it still doesn't make sense why your changes wouldn't show up at all
if this indeed gets used somewhere
then something should be affected, right?
depends a lot where this is used, they can be simply checking if the pixel in x,y has color or not, my changes only multiply the colors so that wouldnt affect it
(im trying now the all black pixels)
got too ambitious and tried first the ^2.3
hehe
no change as well... Also actually runtime.cginc uses a custom class UIE_FRAG_T
so this is most deffinetly being used by another shader
welp let the fun begin
try to get what shader it is
but first let me push Colors update
btw can you send me the source for the shaders?
which ones?
the repo, but u can also send all that you suspect are being used by UITK
if you have the UITK package installed, they're in <Project>/Library/PackageCache/[email protected]/Shaders
there are no shaders committed in the repo, they come with the package
lmao
because it clutters the folders so much
you can also just browse them from inside Unity, that's at least a bit clearer
oh wtf yeah much better thx!
i wonder if theres a debugger for shaders...
there probably is but i doubt i would even know how ot work with it either way
so just to make sure, I downloaded the source code for UITK and checked all usages of Shader.Find(...) and the only ones I can see are the ones in that folder
specifically these
though that doesn't necessarily mean it doesn't use other ones
yeah exactly
i'll check UnityCG now
this might be dumb but could the .dll also contain the cginc?
cuz its so wierd independently of what i do to the cginc nothing changes
lol
im guessing it auto imports, but removed the cginc from the assetbundle and it still works
in what way?
like in Asset Studio or something?
this way
oh yeah the fact that the shader imports it means that the code in the cginc file is compiled into the resulting shader file I'm pretty sure
you can't even put it into a bundle separately
yeah makes sense
if you wanted to test what happens if you leave it out, just comment out the #import lines
yeah it gives errors
by the way how are you testing replacing the original shader with the modified one?
do you just replace the file in the PackageCache folder before building the bundle?
nono, i set it as the kerbalui asset bundle, change the #include and build the bundle
then replace the bundle with the on on uitk for ksp2
that won't do anything
well that explains a lot
since the original shader will still be included and used
do i need to replace the one on packagecache?
yeah that's probably the easiest way to get around it
well that also explains
cuz i just tried to change the cginc in the package cache
and it was "re-downloaded" when i built the bundle
those two added lines you can see is how I deal with it
in the testing build of UitkForKsp2
do you have it on the repo?
oh xD i mean i already cloned the repo is it only that?
yeah pretty much
var runtimeShader = bundle.LoadAsset<Shader>("assets/theme/uie-runtime-custom.shader");
PanelSettings.m_RuntimeShader = runtimeShader;
ofc, substitute the name for your own filename
yeah, and all in lower i imagine
nice
fucking legend
wow you fixed it
yeah unity (or maybe the game) seems to be setting the shader has a Linear space
instead of Gamma
i just forced gamma
nop
actually im sorry
color = UIE_V2F_COLOR_T(uie_gamma_to_linear(v.color.rgb), v.color.a);
the game seems to use linear
so i had to force it from gamma to linear
interesting
theres some advantages on using linear on UI
is this something that could possibly be done without modifying the shader manually?
like from the SpaceWarpUI Unity project settings or something?
maybe?
i would have to look into it cuz you'd need to define symbols inside cginc
#ifdef UNITY_COLORSPACE_GAMMA
#define UIE_COLORSPACE_GAMMA 1
#else
#define UIE_COLORSPACE_GAMMA 0
#endif // UNITY_COLORSPACE_GAMMA
#endif // UIE_COLORSPACE_GAMMA```
basically set this to 0
let me check
like there's this for example
oh
but I don't know if that setting is taken into account when building bundles, or if it's just for the actual build of the game
but it did do this to my UI lmao
I swear to god, if this turns out to be all I've had to do

spent like 2 months researching this issue on and off lmao
but I think that just setting this won't fix anything
blame it on the KSP2 devs for using linear space for the ui lmao
it just gives me an accurate visualization of how it will look in the actual game
it might since it makes sense for bundles to take the player settings into account
and I think we'll still need the shader update
well if I'm not wrong, it applies to the whole game indiscriminately
most games do render ui and the game separately to allow for things like what KSP2 does
gamma for the game and linear for the UI
so maybe?
yup
hm, alright, didn't know about that

gotta double check if my changes to the cginc are not being loaded
deleted all uitk folders and pasted the ones on the latest version, then replaced the bundle lets see
I just deleted all my "-custom" files, and the extra loading code in UitkForKsp2
just built the asset bundle exactly like it was with just that setting changed
btw @cyan terrace you might want to redo the colors for your mods for next update
yup xD
I EVEN KNEW THAT SETTING EXISTED FOR MONTHS
how did I never actually try to change it
u never tried? xD
will fix the colors as I update.
its always the most basic settings lmao
too many mods
suffering from success
isn't it just used in 2 right now?
no lol
i thought it was only cheats menu and notebook too
what uses uitk atm
released:
cheats menu
notebook
countdown
unreleased:
Shadow multiplayer
S.T.A.G.E
KSP stat
lmao
ITS SO FUNNY TO SEE THE 0 TURN INTO A 1 lmao
tho idk if who's making the ui needs to update it as well
in the proj
probably not since the spacewarp ui probably is on gamma
I mean I'm the only one making a UITK UI in Unity I'm pretty sure
Shadow just uses my C# API which uses the PanelSettings from the kerbalui bundle
and for others I'd recommend downloading the SpaceWarpUI project as a basis and going from there, anyway
since they need to get many of the files and change settings to match it
yeah its way easier also
actually I want to include a barebones Unity project as part of a UITK template in SpaceWarp.Template
i do have one made on Unity but since it has custom elements idk if it will load properly
now that UITK is finally ready for a 1.0 release
you should, and include Unity Tools with it
thank you so much once again
np :D im glad it worked
aren't those mostly for parts?
I'd probably leave that for a separate part mod template
welp now my dev queue looks like this
KSP stat
countdown
notebook
Shadow Utility Lib
cheats menu
Shadow mods site
Shadow multiplayer
oh yeah if youre making a separate one yeah
lmao you better have a good routine
how do I clone my self?
Instantiate()
once I get to it I'll probably have to bother you again for a bit of advice
since I haven't actually done anything with part modding myself
np, im more than glad to help

I should do this
i gotta update to windows 11 just for this
thats what my mod site is for but its not finished so it was just faster to develop the mods than to update the list
one thing I'd still like to figure out before I'm completely happy with UitkForKsp2 is providing custom elements for external mods
but I suspect that will be nowhere near this easy and might involve some heavy Harmony patching
to make the VisualTreeAsset be able to see the controls' types when they're loaded into the game
oh they're currently not working yeah
fuck my TUX's rewrite to UITK heavly depends on them
it seems like they only work when the assembly you include them in is built in the same Unity project as the asset bundles that contain the UXML
at least that's my current assumption
well in my case it meant I had to have a reference to the game's DLL in my Unity project, which in turn meant dependency hell where I spent like 2 hours trying to get the project to build
and even then it didn't work in the end lmao
also tried with ThunderKit but encountered some other issues there, can't remember what exactly it was right now
heh, either way that can be left for later i think since most people wont use them
the one thing I really want them for is localization
so that instead of <ui:Label text="my text"/> you can use something like <KerbalUI.Controls.IntlLabel text="SpaceWarp/ModList/Title"/> and it will automatically localize it
I do have an interim solution but that's kinda ugly
I mean it could be worse
basically it recursively goes through all elements in a UIDocument once, and if the element has a text property and its value starts with #, I save the element and the associated localization key, and then update the text value with the actual translation
and it only needs to be re-run whenever the language of the game changes
or you can trigger a change manually when you want to update some element's text
yeah it works, but it would be better with custom elements yeah
iirc it complains about not finding the class
yep
so maybe its an issue like what schlosrat was having?
probably with reflection and fully qualified assembly names (of the classes) it should work
#🔴space-warp message
the thing is, I can't seem to find any notion of the assembly names actually being used
when you open the UXML asset in Asset Studio, it just has some property like
class: "KerbalUI.Controls.IntlLabel"
and nowhere in the file is there any reference to an assembly
maybe thats the problem
its expecting the class to be in the assembly-csharp
so it doesnt need a reference
but then if it used reflection to find the class, it would find it that way
actually it isn't, because you can get classes that are loaded like that
even if from different assemblies
the thing is, probably, uitk is using the assembly when getting the class to avoid conflicts
yeah it's basically what I meant by the Harmony patching
finding the place where it's actually trying to instantiate the classes and patching it
hopefully lmao
Not sure which platform you are building for, but you may need add to add the [Preserve] attribute to your AbilityUIElement class if your are building for IL2CPP. UI Toolkit uses reflection to discover types used by UXML.
not IL2CPP
KSP 2 is Mono
well at least it wasn't too hard to find the relevant code
I do
most of the code is just copied over from the Unity docs examples
so I'm pretty sure I have all I need for it to work
I'll look into it in a bit, now I need to release UitkForKsp2 1.0 with the new bundle so that we can release SW 1.2 with it as a dependency
wdym?
I mean that's what I mean by "release it"
since there are no other changes other than that one bundle
oh ok io thought u were only gonna release the mod and then put on the description
nope the release always contains the kerbalui bundle
I just don't include it in the source code in the repo
because the source for it is available in the git submodule in the repo
though wait a sec
I should migrate UitkForKsp2 to the new 1.2 template if I'm going to be releasing 1.0
no better time for it
true, i think you should
yeah, should be able to
thats funny
its ending here
if (!(CS$<>8__locals1.asset.fullTypeName == "UXML"))
and entering this if
the one i just sent is the decompiled version of this
else if (asset.fullTypeName == UxmlRootElementFactory.k_ElementName)
Which when decompiled turns into the inverse for some reason(probably optimizations?)
why is UxmlRootElementFactory.k_ElementName "UXML"?
i think its a constant? let me check
exactly
internal const string k_ElementName = "UXML";
oh nvm, it's entering that branch, got it
then what's happening inside it?
what im guessing is that the fullTypeName is not being loaded because the Class is not being loaded
similar to what happened to my custom classes on switcharo
but i might be wrong tho i'll keep investigating
if you mean the property fullTypeName, that's definitely loaded
yeah but not properly it seems, it should be as "UXML"
why??
else if (asset.fullTypeName == UxmlRootElementFactory.k_ElementName)
{
// Support UXML without namespace for backward compatibility.
VisualElementFactoryRegistry.TryGetValue(typeof(UxmlRootElementFactory).Namespace + "." + asset.fullTypeName, out factoryList);
}
else
{
return CreateError();
}
it needs to enter that if
oh thats to check if its a unity class let me get it
if (asset.fullTypeName.StartsWith("UnityEngine.Experimental.UIElements.") || asset.fullTypeName.StartsWith("UnityEditor.Experimental.UIElements."))
{
string experimentalTypeName = asset.fullTypeName.Replace(".Experimental.UIElements", ".UIElements");
if (!VisualElementFactoryRegistry.TryGetValue(experimentalTypeName, out factoryList))
{
return CreateError();
}
}
else if (asset.fullTypeName == "UnityEditor.UIElements.ProgressBar")
{
string runtimeTypeName = asset.fullTypeName.Replace("UnityEditor", "UnityEngine");
if (!VisualElementFactoryRegistry.TryGetValue(runtimeTypeName, out factoryList))
{
return CreateError();
}
}
else if (asset.fullTypeName == UxmlRootElementFactory.k_ElementName)
{
// Support UXML without namespace for backward compatibility.
VisualElementFactoryRegistry.TryGetValue(typeof(UxmlRootElementFactory).Namespace + "." + asset.fullTypeName, out factoryList);
}
else
{
return CreateError();
}
what the fuck is it doing
as you can see, at least from my prespective thats only checking to see if thats an unity class
then it check if its a progress bar
the fullTypeName is for example KerbalUI.Controls.IntlLabel
then it checks if its a custom class
why should it ever be equal to "UXML"?
no
i agree with you it makes no sense
they don't really exist in compiled files, they're replaced by their values in the places where they're used
im guessing that
in a regular enviroment, all custom elements get converted into UnityEngine.Experimental.UIElements
since Custom Elements were an experimental feature back in the day
might be a good idea to actually build an empty Unity game with UITK and a custom element, and debug it from there
to see what's different
cuz this makes no sense
typeof(UxmlRootElementFactory).Namespace + "." + asset.fullTypeName
yeah i dont have one i was hoping u still had yours 😅
i do have a couple but i dont have a UITK project ready to instantiate them
I mean you can just do that with the SpaceWarpUI repo
just add a custom element class and build the game
https://docs.unity3d.com/Manual/UIB-structuring-ui-custom-elements.html like this for example
i was busy with some other things but back at this
the wierdest part about this is that
VisualElementFactoryRegistry.TryGetValue(typeof(UxmlRootElementFactory).Namespace + "." + CS$<>8__locals1.asset.fullTypeName, out list);
is ALWAYS going to search for the same thing
its always going to search for UnityEngine.UIElements.UXML
which seems kinda dumb if you ask me
yeah that doesn't make any sense
WELL ACTUALLY it makes sense since you're providing it with the visual tree asset
basically what ur saying is
"look for a UXML on the VisualElementFactoryRegistry of this visual tree asset"
UXML being the root visual element of any UITK element
but the custom elements seem to be passing their type as the root
I mean there's never a class with that name
it even goes against their own naming conventions
UXML vs UxmlFactory
for example
well true...
i'm gonna see what that dictionary has in their values/keys
if it does have the class name i'll transpile it
to bypass that if else
that is if unity doesnt do this......

interesting
it seems to me that we could easily fix this with a postfix of VisualElementFactoryRegistry.RegisterEngineFactories()
internal static void RegisterUserFactories()
{
HashSet<string> hashSet = new HashSet<string>(ScriptingRuntime.GetAllUserAssemblies());
foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
{
if (hashSet.Contains(assembly.GetName().Name + ".dll") && !(assembly.GetName().Name == "UnityEngine.UIElementsModule"))
{
foreach (Type type in assembly.GetTypes())
{
if (typeof(IUxmlFactory).IsAssignableFrom(type) && !type.IsInterface && !type.IsAbstract && !type.IsGenericType)
{
VisualElementFactoryRegistry.RegisterFactory((IUxmlFactory)Activator.CreateInstance(type));
}
}
}
}
}
well that wouldnt work
you need to patch the if else
(this I mean: if (!VisualElementFactoryRegistry.TryGetValue(asset.fullTypeName, out factoryList)))
I mean not the if that is highlighted but the one above
that doesn't have anything to do with the engine paths
oh yeah i mean yeah
if its entering that if it means that it doesnt have the class somehow
i totally overlooked that
sorry lmao that was a really dumb screenshot
np xD i mean yeah either the class is not present or the name is different
only if unity collaborated with me :)
speaking of that i think it just did lol
and speaking of RegisterUserFactories, we know where the issue is now
HashSet<string> userAssemblies = new HashSet<string>(ScriptingRuntime.GetAllUserAssemblies());
well, we could probably just postfix ScriptingRuntime.GetAllUserAssemblies()
and add UitkForKsp2.dll to the list set
well yeah
huh maybe we need more than just UITKforKSP2
i mean each custom element will be in its own .dll
we could put in all the BepInEx plugins' assemblies
wait why a separate project for every single element?
Sorry i mean each mod will have its own .dll with custom elements inside
oh ok
not 1 dll per element
how do we get all BepInEx's assemblies?
(without iterating through every folder)
Chainloader.Plugins.Select(plugin => plugin.GetType().Assembly).ToList();
on it
i'll pr the change in a bit
good eye on that RuntimeFactories thing btw
public static class RegisterBepInExFactoriesPatch
{
[HarmonyPostfix]
[HarmonyPatch(typeof(VisualElementFactoryRegistry), nameof(VisualElementFactoryRegistry.RegisterUserFactories))]
public static void RegisterBepInExFactories(ref string[] __result)
{
__result = __result.AddRangeToArray(Chainloader.Plugins.Select(plugin => plugin.GetType().Assembly.FullName).ToArray());
}
}
smth like this i guess
it wants this format
"mscorlib",
"System",
"System.Core",
"System.Security.Cryptography.Algorithms",
"System.Net.Http",
"System.Data",
"System.Runtime.Serialization",
"System.Xml.Linq",
"System.Numerics",
"System.Xml",
"System.Configuration",
"ExCSS.Unity",
"Unity.Cecil",
"Unity.CompilationPipeline.Common",
RegisterUserFactories has a void return type
it has to be on ScriptingRuntime.GetAllUserAssemblies()
yeah thx lmao
Chainloader.Plugins.SelectMany(plugin => plugin.GetType().Assembly.GetFiles()) .Select(file => Path.GetFileNameWithoutExtension(file.Name));
is probably what you want
huh
fullname returns the .dlk with it
didnt know about that
actually
idk if its the namespace name
or the actual .dll file name
yeah it gives you the namespace, not the filename
which is why I went the route of ...Assembly.GetFiles()...
(that was before I changed Path.GetFileName to Path.GetFileNameWithoutExtension)
hopefully this is what we need
to see if i can load the visual element from a dll instead of an cs file inside unity
seems like it
how are you dealing with the dependencies?
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern string[] GetAllUserAssemblies();
for now i just wanna know if it works 🥲
we should have a lib on SpaceWarp or smth like that to deal with dependencies
yeah I just mean that for me a Unity project with SpaceWarp.dll won't compile unless I carefully cherrypick most of the KSP 2 folder of dependencies
oh no yeah i mean
i was able to put SORRY's dll on my unity proj
with some configs on the .dll importing
let me see if ican do the same a sec
interesting
and i think that it would be the same for SpaceWarp since SORRY depends on SpaceWarp
so the dependencies should be the same if not more
I would use ThunderKit but it doesn't allow you to play a scene
which sucks if you're working on UI
you can test UITK w/o hitting play tho
not the custom elements but if you set up the custom elements right you can set their values inside the UI Builder
well, not fully, for example the SpaceWarp mod list is mostly empty and items are dynamically added in the C# scripts
you can't preview that in UI Builder
only in play mode
it just crashes Unity for me
@stoic bane wasnt it?
even with just empty ThunderKit and KSP 2 imported
Its not designed to.make that happen no
Its theoretically possible in the right circumstances
But ksp2 doesn't meet those circumstances
yeah, sadly
I was able to do itnwith ror2, but I had to reimplement stuff still
But it was possible because ror2 has 100% of its assets in Addressables
I really like the idea of developing mods in Unity, but when you combine the fact that I can't preview UI in play mode, and Unity doesn't support modern versions of C#, just makes it not worth it for me
tho its a bit wierd since we dont really have any KSP2 functionality on unity do we?
Why do you need to preview ui like that?
I just have separate Unity projects for UI bundles and then C#-only projects for the mod code
the list is populated dynamically
but i think you can also populate it with the UXMLFactory
Make design time data fakes
yeah i think you can do that
but it makes the whole developing pipeline much more complicated
also why not try a [RunInEditMode]?
either I can have fake data in the list and see it in the UI Builder preview, or I can have it be done dynamically like in the real use case and I can just change some values and immediately build my bundles
I mean I already made a whole mock SpaceWarp.dll which contains fake data for the mod list monobehaviors
so I can easily preview the list functionality in play mode
i mean i think that as long as you keep the same assembly name you can use both the mock and the SpaceWarp's class no?
and still keep the actual UXML assets exactly as they're used in the game
for what?
for the UITK to load them
since it loads through the name
so if you make SpaceWarpMock to be SpaceWarp (this being the assembly name)
UITK wouldnt know the difference between the mock and the original
oh yeah that's how it works
I'm using the same assembly name and namespaces and everything
oh great then that should work yeah
then i think theres no need for thunder kit
tho its a bit more work to keep both custom controls the same
both the mock and the code's custom control
maybe add a convention to keep a modId.UITK.dll?
and custom load it?
tbh thats even worse lmao
but then it won't show up in Chainloader.Plugins
btw have you tested this? iirc, you can't just patch a native method easily
(the PR i mean)
afaik, it basically completely replaces the method and the original won't run
if so i'll transpile the UITK's RegisterUserFactories
to after getting all assemblies, add the BepInEx's also
I'm almost done with it, no worries
[HarmonyPatch]
public static class CustomElementsPatch
{
#pragma warning disable CS0618
[HarmonyPatch(typeof(VisualElementFactoryRegistry), nameof(VisualElementFactoryRegistry.RegisterUserFactories))]
[HarmonyPostfix]
public static void VisualElementFactoryRegistry_RegisterUserFactories()
{
Chainloader.Plugins
.SelectMany(plugin => plugin.GetType().Assembly.GetTypes())
.Where(type => typeof(IUxmlFactory).IsAssignableFrom(type)
&& !type.IsInterface
&& !type.IsAbstract
&& !type.IsGenericType)
.ToList()
.ForEach(type =>
{
var factory = (IUxmlFactory)Activator.CreateInstance(type);
VisualElementFactoryRegistry.RegisterFactory(factory);
});
}
#pragma warning restore CS0618
}
does that look ok to you?
it does but let me double check with the og code
internal static void RegisterUserFactories()
{
HashSet<string> hashSet = new HashSet<string>(ScriptingRuntime.GetAllUserAssemblies());
foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
{
if (hashSet.Contains(assembly.GetName().Name + ".dll") && !(assembly.GetName().Name == "UnityEngine.UIElementsModule"))
{
foreach (Type type in assembly.GetTypes())
{
if (typeof(IUxmlFactory).IsAssignableFrom(type) && !type.IsInterface && !type.IsAbstract && !type.IsGenericType)
{
VisualElementFactoryRegistry.RegisterFactory((IUxmlFactory)Activator.CreateInstance(type));
}
}
}
}
}
pasting here for eassier comparison
is that decompiled?
oh, I was just wondering because it's different from my source, lmao
i think this is old source
theres 2 uitk repos
one is very outdated and one is much newer than our version
from what I've seen
lmao
and this
yeah but tbf we need to look at the outdated one
since were on a old version
this one is our version of uitk
the exact code that our version is using is in SpaceWarpUI/Library/PackageCache/[email protected]/Core
thats the source u have?
internal static void RegisterUserFactories()
{
// In the Player, we filter assemblies to only introspect types of user assemblies
// which will exclude Unity builtin assemblies (i.e. runtime modules).
#if !UNITY_EDITOR
HashSet<string> userAssemblies = new HashSet<string>(ScriptingRuntime.GetAllUserAssemblies());
var assemblies = AppDomain.CurrentDomain.GetAssemblies();
foreach (Assembly assembly in assemblies)
{
if (!(userAssemblies.Contains(assembly.GetName().Name + ".dll"))
// Exclude core UIElements factories which are registered manually
|| assembly.GetName().Name == "UnityEngine.UIElementsModule")
continue;
var types = assembly.GetTypes();
foreach (Type type in types)
{
if (!typeof(IUxmlFactory).IsAssignableFrom(type)
|| type.IsInterface
|| type.IsAbstract
|| type.IsGenericType)
continue;
var factory = (IUxmlFactory)Activator.CreateInstance(type);
RegisterFactory(factory);
}
}
#endif
}
yep
all the packages' sources are in PackageCache
lmao
yeah thats the same as this then
i'll delete my pr 🥲
xD
😅
I still very much appreciate all the assistance and having someone to bounce ideas off of each other
xD thats what im here for
u already help me a lot with my mods so just giving back 
i think thats all for UITK then
now its just a matter of adding custom controls that people can use like the intlabel
well, for me the biggest thing for now is the game fonts
lets make someone pay for them 
I can get the TMP_FontAsset for them, but UITK doesn't use TMP
but since TextCore is basically a direct descendant of TMP, I think it should be possible to "convert" it
aka just copy all the relevant properties into an instance of TextCore FontAsset

i think if we dig into the TMP_Font conversion we can reverse engineer it
since on unity you can convert fonts from .font to TMP_Font
line 1733
private void UpgradeFontAsset()
lmao I see it's the same thing I was suggesting