#Addressables help
1 messages Β· Page 2 of 1
the problem really
is that
your builtin
seems to be pointing to the games folder
do this
build the addressables
and before u actually put it in the game
send the catalog.json pls
why doesnt unity let us change the builtin settings more easy?
btw
well its not of much help for you now
template needs that
but any new group you create now will have the right settings
good to know
because seriously wtf
i think it already has the %ChangePath% thingie
also have no idea how you would make a template that has everything ready to go for unity
tho i'll double check
pretty easily
yeah most unity files are readable, so you can just search for something and replace
most of the stuff is set up in text files, and when you generate the project, you just replace placeholders
π
im not even religious
hail satan!
either way im happy for you!
all hail the box
same workflow for the particle acelerator btw
whats in the box?
candy...
i dont know what workflow means
but at least now, ill forget in 2 months how to do this
remember, same thing you put on the partName, you put on the addressables pair
and the addressables pair is always
- partName.json
- partName.prefab
LUL i can color the box
that makes sense
and im gonna go through this post to make sure i write down the procedures of how to do this
maybe in 2 months munix has the template

i mean the template is not something that easy to do xD
I sure hope it won't take that long lmao
lol
but right now I'm completely rewriting the current templates
so this will come after that
well now i need to finish my linac modules
then figure out how i can upload them inidivudally
so theyre three separate parts
just make 3 separate prefabs
but ive gotta look at my models and decide what is going where
thast what i meant by easy after the first setup
it was painful but it was worth it 
good night finally lmao
Minecraft textures amirite 
@royal grotto Do I need to duplicate what I did with testpart with all of these or since they're the same part when they're assembled, can I place them together and use one collider for them?
Create an empty gameobject on your part snd add s mesh collider
Dont forget to tick the Convex box on it
this is how i have it, it all goes to the testPart
so testPart will get smesh collider? or will that go with the individual parts?
using capsule colliders right now
why are you making 5 seperate collision boxes?
I thought I had to
you don't have to lmao
hm
just put one of the col's and then the other 2 game object thingys from the video(s), then just add a mesh collider and click on convex
so one collider per part?
it makes everything collidable
makes sense but also weird
from said part
and the collider should be a mesh collider?
this should be the structure
so now it interacts with surfaces
yeah
how 
dafuq is the box thing for?
it's just a random name for the mesh
so what is in collision and what is in box?
okay 1 sec
if box has a mesh, im confused now
this is for example another part
collision is just an empty gameobject
so is col_box_prim
with no components?
yeah
and this is mesh
the "mesh" in mesh collider should be your .obj
for the part
don't ask me, I just used the tutorials from stick awhile back
yeah it looks like it's working
thank you! i had no idea, thats pretty dope
@round lion @royal grotto when i export two parts, they just sink through the airfield?
the collider needs to be convex!
they are
could it be an issue of the animation? since my animation isnt working properly, could that cause issues with the mesh?
also i removed srfAttach from the collector. could that be causing an issue?
are these meant to be 2 seperate parts in one? Why do you have 2 .json's? Also it may be your animation not being controlled (at all or properly)
wait no nvm
two separate parts but they work together
ultimately ill have three parts
collector, waveguide, and electrongun
it can cause the animation to play constantly, not move the part
yup i removed animation as i dont need it right now
ive got the animations, but not using them as it just yeets stuff lol
yeah you need to somehow control em
yup
and that will be user based etc and a bit more than i need to do right now
right now is just testing textures
glad my animations work and when i get to that point ill get them functioning properly
wait so did the collision fix itself or smth?
honestly I need to sit down and see how to make them work properly too lol
but anyways, I doubt the animation would be the issue
oh I know what it might be
on an earlier picture you didn't set the Mesh collider's mesh
itll be good to know how to animate properly as itll be nice. especially being able to have a "right click > deploy" option
the animation part in unity is easy, it's hard implementing it
you right
hm
i tested it wasnt the animation so im looking at the mesh
so where it says Mesh None (Mesh) i need to set that?
no problem lol
nice
that's good
and the collider loses all texture when it loads into the game but in the vab it has texture
weird
does not setting the CoM etc cause issues?
oh
when i make these parts, they have to use 0,0,0 (x,y,z) when i prefab them otherwise it makes it unbalanced
wym by that?
those are the two gameobjects that have the meshes attached to them
in game, the collectorbase is off center by -6
which causes it to be off balance
so is my theory
KSP2 Unity Tools gives you the CoM preview
that should be at the same position as the center of your mesh
see?
so i need to move the com of that object
to line up properly
ahh
this makes sense
test it!
rebuilding
i also need to make a paintmap that works properly. the one i made doesnt allow it to be transparent for some reason
but currently its all about...
metal. testing metallic textures
wait
is the mesh messed up with its position?
your collision
collision is completely blank

in the gameobject collector and waveguide
yeetster propapagating his wrong doings
LUL
already told him the right way to do things but he just ignores me
Basically something like this
partName (GameOject with partCoreData)
-model(Empty GameOject)
-mesh(GameObject with Mesh Filter & MeshRenderer)
-col(GameObject with MeshCollider)
the game needs that empty GameObject named model
also the Mesh Filter/Renderer should not be in the same Game Object as your collider
also the mesh and the collider should be a child of the "model" empty game object
can you pin that?
sure
be a good reference as i make parts
i appreciate it ill rework this and test it and paste results
you can put the "col" as a child of the "mesh" if you want
also both the "mesh" and the "col" can be named whatever you want, i put it like that cuz thats how i name most of the times (if its only 1 mesh and 1 collider on the part)
yeah its easy to name them mesh or col as it makes things uniform
and im all about uniformity so everyone is on the same page
makes it easier to debug stuff
as you should π
thast no problem
then col is attached to mesh as a child
wait so every Collector_ is a mesh filter and renderer?
they dont have colliders right?
nope
the Collector has the collider currently
does it show green lines?
let me get into unity so that i can show u what i mean a sec
i appreciate it lux
yes
thats the collider
you should have the same green lines
but of them being the shape of your part
from what i can see you have a triangle there in the back
which doenst seem right
yeah some random triangle thing
can you click on the col, and show me what components it has?
yeah makes sense
actually its one of its childs that has the collider
oh
as you can see theres no Collider component there
so collector is empty?
the collector has these 3 components
nono xD thats all the data of your part
but mesh is the collider
exactly thats what i was gonna say
tho
your mesh seems wrong then
for such a complex part
i'd advise you make a new mesh in blender
to put as a collider
basically just a simple mesh that you feel like will give u the collider you want
if you want, for now it can be just a cyllinder
that encapsulates all of the other meshes
the mesh collider simply gets the mesh you feed it and and "shows it as green lines"
what does it look like w/o convex?
yup
tho, how does it look w/o convex?
a convex mesh is a mesh with a max of 256 vertices
yeah
no convex and it looks like its supposed to
lol
just imagine you're a collision program trying to detect either or not you're colliding with that thing
you'd have to check every step of the way
when you have a convex mesh you're either colliding or not, theres no inbetween
yeah thats a lot to maths
on your mesh if you're on the center ur not colliding, but a bit to the side you are, but a bit more to the side you arent
etc etc
either way, unity tries to make your mesh convex
but due to the complexity it cant
thus you needing to make a mesh on blender for colliding
this is just an empty cylinder?
thats what confuses me its the same thing as the waveguide tube
now try to turn that empty cyllinder into only 256 vertices xD
cries
The convex option is like stretching rubber bands between the outer-most vertices. Just like Tiimmy said, Unity makes a more efficient mesh for objects like this rock example. You could also think of it as gift-wrapping your mesh. Irrespective of how helpful it is, primitives are nearly always going to be more efficient.
Basically the convex check mark will make a collider around your mesh without any 'indented' areas.
there's ways to make your mesh hollow tho dw
but you'll need a bit more blender magic for that
thats what is weird to me
https://docs.unity3d.com/Manual/class-MeshCollider.html
Enable the checkbox to make the Mesh Collider collide with other Mesh Colliders. Convex Mesh Colliders are limited to 255 triangles.
i build this cylinder the same way i built the other cylinder
the other has a cap in it doesnt it?
either way unity is having trouble transforming that into only 255 triangles
i have an idea as to why
maybe do to the complexity of the mesh
oh thats no problem
nono thats no problem
when its just auto shaded its just like the other one
thats normals
oh
not the actual mesh
that doesnt affect your mesh per say
just how the triangles are oriented
tho if you want to make your mesh hollow
you'll have to make the walls in 255 triangles
this makes zero sense. literally the cylinder is a copy of the waveguide tube
you can divide that into various sections
they're literally the same part
one of them i can have normal physics on, and the other one goes haywire
you can just use the waveform mesh then
alright reworked those
what goes in col? also it has simplified the mesh so its not a billion vertices.
great
on the coll
you put a Mesh Collider
and set that simplified mesh to the mesh section
so mesh gets a mesh collider AND col gets a mesh collider?
k
so the col';s now have mesh colliders and theyre using convex's
do i need to set the mesh to a gameobject?
well
the simplified mesh no
unless you want to use it for something
as you can see now i thas the green lines
col - Mesh Collider
Check - Convex
Cooking Options: Mixed
Material - None
Mesh: Collector_Tube```
then theres someting called simpilified mesh that goes into mesh?
tho you dont need to worry about the 2 in the middle
Yeah, you put the simplified mesh on the Mesh:
what do you mean by simplified mesh. is it something i create, it should be made, or is it what ive already go tselected?
okay
just just a mesh that encapsulates your whole part
so it wont be called simplified mesh, itll be called whatever i called it
that will be the mesh that the game will use for colliding with things
yes whataver you wanna call it
π
that fixed it, but ive gotta simplify the other parts to the collider
thats why the graphical glitch happened
@round lion do things right
has to do with the colliders

meshes are just meshes, they have no collider
meshes quite literally just "draw themselfs to the camera"
yup
i undersatnd what they are, i just needed to understand the proper way to do it in unity
so you've explained it very well. i appreicate it. im sure ill have more questions down the road lol
feel free to ask them!
ah
any guide on animating things properly
ive got my animations
i just dont know how to use them properly because when i use them, the triggers arent set up etc
1st thing would be to normalize your mesh size and position
hm?
ctrl+a on unity
look above, he fixed it
sorry @sage pine ctrl+a on Blender
THO careful
do i need multiple mesh colliders for these parts? ie the ones in black
i mean you definetly can
hell nah I'm not dealing with simplified meshes
then no parts working for you 
ive already got the animations in unity from blender
game rules (literally)
hmm
honestly i do my animations on Unity
but theres a way to import them correctly
animations are working properly that ive imported, i just dont know how to add them to the object
mesh is attached to collector_tube which is not what i want to animate
the animation will be attached to the magnets (pos and neg)
makes sense
an Animation Clip
havent played with that yet
i figure its the script that allows you to do exactly what it says
its from KSP not from unity so yeah
ill mess with it later
well, should do what it says but we have to test that
this is what is generated when i add the Animation to the object
wejll when i add "Animator"
and i assume i add different layers and those control which animation happens?
I think this will just make the animation loop
a sec let me see what u sent
should be only 1 layer
you control the animation with
ohh
the paramenters
and then using the parameters changes how it animates etc
makes sense
kinda yeah
for your case you probably can use the game's provided ways
yeah the idea is to make things deployable
since its science, i want it to be able to right click and have options for them to do the science
and animations attached to what they click
so they click "vaccuum seal particle accelerator"
and it does an animation
idk how science will work
but thats a little bit away
so we'll have to wait on that
yeah thats also why i havent tried tdo do anything with it yet
that makes sense
obviously hvaent spent much time with the animations but thats down the road. at least i understand how to modify it and such
seems to be working tho! :D
yeah it works but more to do to make it function better
ive gotta rework the animations in blender
and then figure out how to code the solar panels and deploy thing
unless you already have some script that i can use as a base?
thats the whole concept behind modules
ill have a GUI that looks like a computer screen
you have generic modules for what you need
and lets the player use the GUI to modify behavior of the particle accelerator
buitttt again thats a good bit down the road
^
today its about getting textures right
ah
i need my textures in my blender file before i import them otherwise they don't work in game properly
but i did get this right
how they connect looks cool
FYI: it's not a bug as to why it shows up black. If you don't UV unwrap your parts, the textures will show up black in game
hm
if that 1 place is blue the texture will be blue
hm
@midnight torrent starting from here down is how lux help me get the gizmo's working as well as getting the addressables to work properly
alr
this is super important that you rename these to not be the full path. it will default them to being the full path. shorten it to whatever you've named your gameobject and your json
nice!
this thread is basically that tutorial plus more only problem is you have to search through it to find the fixes
lux has pinned some important stuff and as i remmeber things ill ahve him pin more
@royal grotto so yeah ive got a few more things to tweak with basic textures, gotta make a paint map, and finish the electrongun model
but wanted to dabble with vfx a bit today
good to know
so a lot of experimenting should result in something useful
am i able to use this
Like 4/5 layers of particle systems isnt a bad idea
or
Heh sure
that was my plan was layering the laser in 5 layers
i was using line renderer and trail renderer to experiment with
It wont look great in ksp cuz the unitys line render aint the best but for now
oh
yup
With no effects nothing
dont mind me
LUL
im assuming this will work just like an engine
because the engine has a plume
but instead of it being plume for an engine, its just a laser beam
that will have heat etc
does your second video cover that part of the engine build?
used the same structure for the last part - the electrongun
but as this is vfx, does it go with the part its making a vfx for? or does it go separate?
Lmao yeah thats what i mean for line renderer isnt the best
Unfortunately im the only one working on tools fo ksp2 atm so πππ
GamePlay wise i mean
trying to figure out how to let it be a random seed but to also keep it within x,y,z spacing

yeah
its epic
wait one
thats only one layer
there we go starting to hone this thing in and make particles
so each particle can create another particle lol
particles go correct direction in unity (x axis) but in game they travel on the -z axis
is there something im missing with setting origins of particles up correctly?
parts in game are oriented upwards
think that the game is made for rockets
so you orient your parts as if they were part of a rocket
easy fix is to just rotate your particles
the right fix is to make your part be oriented up
the part is oriented up π
then im lost 
@royal grotto ```cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ParticleTrigger : MonoBehaviour
{
public ParticleSystem particleSystem;
public Light[] lights;
public AudioSource audioSource;
private void Start()
{
// Perform any initialization or setup here
}
private void OnTriggerEnter(Collider other)
{
if (other.CompareTag("Player"))
{
particleSystem.Play();
foreach (Light light in lights)
{
light.enabled = true;
}
if (audioSource != null)
{
audioSource.Play();
}
}
}
}
this is a script I was working on to add a trigger to the particles. is this the correct way to do it or is there another way to do this properly?
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
[ExecuteInEditMode]
public class TriggerScript : MonoBehaviour
{
ParticleSystem ps;
// these lists are used to contain the particles which match
// the trigger conditions each frame.
List<ParticleSystem.Particle> enter = new List<ParticleSystem.Particle>();
List<ParticleSystem.Particle> exit = new List<ParticleSystem.Particle>();
void OnEnable()
{
ps = GetComponent<ParticleSystem>();
}
void OnParticleTrigger()
{
// get the particles which matched the trigger conditions this frame
int numEnter = ps.GetTriggerParticles(ParticleSystemTriggerEventType.Enter, enter);
int numExit = ps.GetTriggerParticles(ParticleSystemTriggerEventType.Exit, exit);
// iterate through the particles which entered the trigger and make them red
for (int i = 0; i < numEnter; i++)
{
ParticleSystem.Particle p = enter[i];
p.startColor = new Color32(255, 0, 0, 255);
enter[i] = p;
}
// iterate through the particles which exited the trigger and make them green
for (int i = 0; i < numExit; i++)
{
ParticleSystem.Particle p = exit[i];
p.startColor = new Color32(0, 255, 0, 255);
exit[i] = p;
}
// re-assign the modified particles back into the particle system
ps.SetTriggerParticles(ParticleSystemTriggerEventType.Enter, enter);
ps.SetTriggerParticles(ParticleSystemTriggerEventType.Exit, exit);
}
}
``` this is the example from unity documentation
sure, tho the game already has that, i just dont know how to work w it
