#archived-code-advanced

1 messages · Page 6 of 1

sly grove
#

Don't make a 2D game out of UI elements 🥺

chilly nymph
#

I'm making a ton of menus.

#

There's reasons I'm pooling.

#

Isn't this an advanced channel? 😄

sly grove
#

Yes. Sometimes people think it's a good idea to make things like card games purely out of UI elements though

gentle topaz
#

Just don't understand the value of saying "Would be crazy of I was making a 2D game" as if that meant anything. What does making a 2D game have to do with UI? There can be 2D games with almost no UI, and 3D games with tons of UI.

#

It is also possible to have conversations without sounding entitled and sarcastic. Usually gets your question answered faster.

chilly nymph
chilly nymph
#

We're in Advanced chat are we not? Why do you automatically assume people don't know what they are doing? Is that a insecurity about your own skills?

hard lily
#

My game has UI but does not use Unity's UI system

chilly nymph
#

My entire game is UI.

hard lily
#

People often pool UI objects by reparenting and then disabling them, which causes unnecessary dirtying.

Solution: Disable the object first, then reparent it into the pool.

You will dirty the old hierarchy once, but once you reparent it, you’ll avoid dirtying the old hierarchy a second time – and you won’t dirty the new hierarchy at all. If you’re removing an object from the pool, reparent it first, update your data, and then enable it.```
#

That article has a lot of useful tips on the matter

chilly nymph
#

Yes I'm aware of that thank you.

wet burrow
#

Class A (which I made) won't recognise class C (a Unity class) but class B (which I didn't make) can, even though A and B both use the namespace that C is part of. Why could this be happening?
I've heard it might be something to do with assembly definitions, but I don't know enough about that to actually figure out a solution.

gentle topaz
#

Well if your code is in a custom assembly (even if it was an accident), you would need to reference the Unity assembly that contains class C. This is probably what class B did.

#

Hard to give a definitive answer with so little information.

wet burrow
wet burrow
flint sage
#

No it's a separate file

gentle topaz
#

If assembly definitions are present, it has nothing to do with the code itself.

flint sage
#

Anyways, read the docs to figure out how they work and see if you have any

wet burrow
#

@flint sage @gentle topaz so how would I actually figure out which assembly definition a class belongs to? I searched for all the files with the .asmdef extension, but there's a ton of them and none of the names seem to correspond to stuff in the B class

flint sage
#

Asmdefs apply to the folder they're in and sub folders, check your project structure

wet burrow
flint sage
#

Something like that yeah

gentle topaz
#

If you didn't make the code for B (as in it's third party), I would go for the first option (or find whatever existing assembly that its part of and add the references there)

wet burrow
#

@flint sage okay I didn't find one in the exact folder, but I backed up two parent folders and found an .asmdef file that seems to be related to that code.

wet burrow
#

well fuck you then Unity

#

I opened the asmdef and all the references are arbitrary strings of hexadecimal values, all preceeded by GUID:

gentle topaz
#

You don't want to open it in a text editor..

#

It has an inspector where you can configure all the references and build targets

wet burrow
#

@gentle topaz okay I think I found the file in the editor and opened it in the inspector

#

back in 5 mins

narrow marsh
#

Hey guys, i did a code to add items to inventory, it has a system to handle the maxstack per item, for example HP Potions maxStack can be 30 and leather can be 500 and equipments 1.
I have a problem because when the bag is almost full the game breaks for a second to do the code, cause of the complexity i've done it.
Anyone knows how can i optimize this?

public void Add(Item item,int nItems){
        int rest = nItems;
        if(Items.Find(i => i.id==item.id && i.qnt < i.maxStack)!= null){
            foreach(Item i in Items){
                if(i.id == item.id && i.qnt < i.maxStack && rest > 0){
                    if(i.qnt + rest > i.maxStack){
                        rest = i.qnt+rest - i.maxStack;
                        i.qnt = i.maxStack;
                    }else{
                        i.qnt += rest;
                        rest = 0;
                    }
                }
            }
        }
        
        if(rest>0){
            do{
                Item i = item;
                if(rest > i.maxStack){
                    i.qnt = i.maxStack;
                    rest -= i.maxStack;
                }else{
                    i.qnt = rest;
                    rest = 0;
                }
                Items.Add(i);
            }while(rest>0);
        }
    }
wet burrow
#

@gentle topaz okay so I wasn't able to figure out exactly what I needed, but I copied and renamed that existing assembly definition, and now the reference seems to work?

#

@gentle topaz thanks

deep scaffold
#

I dont like this 2 solution

#

trying to find better one

novel plinth
#

Value types cant be null unless they're nullable value types

heavy juniper
#

Hey guys, I am trying to get collision surface normal (normal vector) to fire explosion in that direction. I am using onCollisionEnter(Collision col) to get collision normal via col.GetContacts(0).normal, however when I draw the ray in Scene view the normals are completely off, always pointing in forward direction (slightly randomly).
Surfaces the capsule hits vary (some are planes, some are triangle-segmented spheres etc.). At the end of the day it always hits the flat surface, therefore there should be no problem with normals. Any help would be appreciated 🙂 (an example below is how I imagined it to be)...sorry for spamming, was not sure whether this belongs in #archived-code-general or #archived-code-advanced

fresh salmon
#

Can you post the code where you draw the normal for debug? Depending on the method there are small differences to the arguments you need to pass.

#

Normals were always accurate for me, so I suspect the issue is on the debug draw

#

Also don't cross-post

heavy juniper
wise bobcat
#

hello

#

I really need help with something
and i am asking it for like 2 days

heavy juniper
#

@fresh salmon void Explode(Collision collision) { Quaternion ExplosionRotation = Quaternion.FromToRotation(Vector3.forward, collision.GetContact(0).normal); Debug.DrawRay(transform.position, collision.GetContact(0).normal*100f, Color.red, 10f); GameObject explosion = Instantiate(Explosion, transform.position, ExplosionRotation); explosion.GetComponent<Explosion>().IsOpponent = IsOpponent; Destroy(gameObject); }

#

I save the collision from onCollisionEnter() and pass it in Explode()

fresh salmon
#

Alright gotta check the docs one sec

dense pond
#

collision.GetContact(0).normal is different from the surface normal

#

probably use a raycast or something to get the surface normal

fresh salmon
#

And transform.position as the origin point of the debug ray seems wrong

#

Surely you would pass the hit point in there

deep scaffold
heavy juniper
heavy juniper
#

What is the most convential way of getting the surface normal upon collision? Is RayCastHit the only way?

fresh salmon
#

I wonder how you get your Collision parameter then

#

Because you usually get that from OnCollisionEnter, and without a collider on both surfaces OnCollisionEnter doesn't run

heavy juniper
# fresh salmon I wonder how you get your Collision parameter then

So this is a grenade that sticks to the surface and explodes. I have Update() in which I have a coroutine that regulates when it's the time to trigger Explode(Collision collision). I also have OnCollisionEnter(Collision collision) in which I get collision, it is saved as protected Collision collision globally in the Grenade.cs file.

#

this is all the logic

fresh salmon
#

Yeah, but

I do not have collider/Rigidbody on the surface it hits
With this information, I'm pretty sure your OnCollisionEnter never runs

heavy juniper
fresh salmon
#

Ah alright

heavy juniper
# fresh salmon Ah alright

This is the dome the player on that podium can hit. The grenade sticks to the surface (becoming Kinematic when onCollisionEnter() is triggered)

fresh salmon
#

Can you try:

Quaternion explosionRotation = Quaternion.LookRotation(collision.GetContact(0).normal);

For the rotation calculation? This assumes the local Z axis of the explosion prefab points outwards, ie. the particles of the explosion go towards their Z axis

heavy juniper
wise bobcat
#

thx for the reply

regal olive
#

lol alr

heavy juniper
#

Could the rotation of the projectile (i.e. grenade) hinder the normal vector?

#

Or does the Collision collision parameter in callback OnCollisionEnter() account for the angle in which it came in? Maybe that scuffs the normal?

fresh salmon
#

Nah it should stay consistent whatever the angle of the object is, if you didn't do that yet can you try setting the Rigidbody's collision detection mode to "Continuous Dynamic"?

heavy juniper
fresh salmon
#

Itll put more load on the physics engine, but you can't get collisions that are more accurate than this

#

Grenade, as it's the one with a Rigidbody

heavy juniper
#

Already on Continuos Dynamic.

fresh salmon
#

I'm out of ideas then...

heavy juniper
fresh salmon
#

Looks good to me

heavy juniper
#

Ironically, it never rotates correctly exactly, so there must be a major flaw. Could be that some colliders are not that well interactable with each other (i.e. Mesh and Capsule collider)?

#

...this is how it happens usually

#

where e = actual explosion direction

#

sometimes it hits ok, sometimes like this..it's like a Russian roulette 😄

#

The worst case scenario I will have to switch to radial explosions but that would be a defeat on my end

trail cloak
#

Hello there, recently I am encountering an editor crashing issue that happens both in Editor Play mode and Runtime

#

here is the editor generated crash log:

#
=================================================================
    Native Crash Reporting
=================================================================
Got a UNKNOWN while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=================================================================
    Managed Stacktrace:
=================================================================
      at <unknown> <0xffffffff>
      at UnityEngine.Transform:SetParent <0x00156>
      at UnityEngine.Transform:SetParent <0x00092>
      at DEYU.AdpUISystem.Managers.AdpUIPannelManager:PrepareBufferedPannel <0x0028a>
      at DEYU.AdpUISystem.Managers.AdpUIPannelManager:PrepareBufferedPannel <0x000ca>
      at Common.UI.UniversalGameManager:OpenDialogMenu <0x001da>
      at Common.TimelineExtestion.COM_ADialog_Play_Behaviour:OnBehaviourEnter <0x0018a>
      at Common.TimelineExtestion.ExtendedPlayableBehaviour:OnBehaviourPlay <0x0013f>
      at <Module>:runtime_invoke_void__this___Playable_FrameData <0x00259>
      at <unknown> <0xffffffff>
      at UnityEngine.Playables.PlayableDirector:Evaluate <0x00140>
      at Common.TimelineExtestion.GameTimeManager:Update <0x002fa>
      at System.Object:runtime_invoke_void__this__ <0x00187>
=================================================================
Received signal SIGSEGV
Obtained 54 stack frames
0x00007ff60bd7cbfd (Unity) UI::CanvasRenderer::UpdateParentHierarchyChange
0x00007ff60b56c01f (Unity) TransformHierarchyChangeDispatch::DispatchSelfAndAllChildren
0x00007ff60b564c0b (Unity) Transform::SetParent
0x00007ff60aa8a188 (Unity) Transform_CUSTOM_SetParent
<Other Log>
#

In runtime it looks like:

#
========== OUTPUTTING STACK TRACE ==================

0x00007FFF1432B093 (UnityPlayer) UnityMain
0x00007FFF1431CB44 (UnityPlayer) UnityMain
0x00007FFF143285F0 (UnityPlayer) UnityMain
0x00007FFF14328B54 (UnityPlayer) UnityMain
#

The piece of code that produce the specific issue is:

heavy juniper
#

@trail cloak Which unity version do you have

trail cloak
#

LTS

#
        public static T PrepareBufferedPannel<T>(GameObject pannelParent, Action<T> preInitializeCallback = null) where T : UIPannelBase
        {
            T pannelInstance;
            if (Instance.m_BufferedPannel.TryGetValue(pannelParent, out var pannelInstanceSrc))
            {
                pannelInstance = (T)pannelInstanceSrc;
                var parent = ActivePannelTransform.Peek().Root;
                //Debug.LogError("Get Pannl To Transform: " + parent.name, parent);
                pannelInstance.transform.SetParent(parent);

                if (Instance.m_BufferedPannelRectTransform.TryGetValue(pannelParent, out var data))
                {
                    data.ToRectTransform((RectTransform)pannelInstance.transform);
                    Instance.m_BufferedPannelRectTransform.Remove(pannelParent);
                }
                pannelInstance.gameObject.SetActive(true);
            }
            else
            {
                pannelInstance = GenerateBufferedPannel(pannelParent, preInitializeCallback);
            }
            return pannelInstance;
        }
#
pannelInstance.transform.SetParent(parent);
#

This line is where the issue happens

#

However this method is widely used under different scenarios, and I failed on finding any useful information about it.

heavy juniper
#

This particular error is versioning error of Unity

trail cloak
#

versioning error??

#

May I have a more detailed definition on this word? (I'm non-native speaker

heavy juniper
#

It happens due to limitations sometimes on particular version, however the odds are it could be something else

high karma
#

As in that the error only shows on that version.

heavy juniper
trail cloak
#

I see... I'm going to upgrade/downgrade the project and try again

heavy juniper
#

How long have you been using this version, has the version gotten any updates?

trail cloak
#

This is an LTS version... which been released recently

heavy juniper
#

Did you edit the any of the source projects files by any chance..changing guid or something

trail cloak
#

No I didn't

#

Just saw a new version (2021.3.7f1)

heavy juniper
#

did it run ok before on this version

#

if it was released recently, it could have gotten a patch by developers that caused the bug

#

@trail cloak Another thing, try looking in Package Manager for any errors (instead of a green tick, it will have a yellow sign or red stop sign)

#

@trail cloak wait, wait...

#

you have a stacktrace error 😄

#

One of the parents or children is null

trail cloak
#

weird

heavy juniper
#

var parent = null I assume

#

Check for nullity with if

trail cloak
#

I will try to log it

heavy juniper
#

Check if ActivePannelTransform is empty

#

because you do not seem to get the root/parent

#

SetParent() probably does not accept null values is my guess

trail cloak
#

wait.... it stops crashing after I added the check

heavy juniper
#

obviously, but the question still remains

trail cloak
heavy juniper
#

Why is ActivePannelTransform null or empty? Where do you get it

trail cloak
heavy juniper
#

Hmmm

trail cloak
#

may be I should remove this line and try again

heavy juniper
#

if it works, you have a caching issue

#

LogError logs into error stream, thus ignored but packed in the error in Console I assume

trail cloak
#

And.... it crashes after I remove the log line

heavy juniper
#

Yes, try to find out why is parent == null ,that is why is ActivePannelTransform not returning you the parent.

trail cloak
#

I see, but a SetParent(null) can crash the Unity....

#

I should open a new project and test it

heavy juniper
#

Sure

#

Try downgrading the unity version

#

and if so (issue is gone with the downgraded version), report it to Unity hub forums as others may encounter the same issue, should prioritize the potential fix

trail cloak
#

Anyway thx for the help

heavy juniper
undone coral
tiny lotus
#

Hi there, we collaborate with a team that told us the following:
When rescaling in Unity, Unity has to do an operation every frame for every asset that is rescaled. On top of that, if the rescaling is non linear (Height is 0.6 and width is 0.8, for example), then unity has to do ANOTHER operation every frame. So, optimization-wise, since we'll be targeting mobile, it would be best to scale assets in maya.

I did not find any information concerning this performance optimization on the Unity documentation. Someone can confirm that (or not)?

flint sage
#

I mean I guess it's technically correct but it's a matrix multiplication based on the transform values, it'll be executed either way afaik

tiny lotus
rugged radish
tender light
rugged radish
#

no idea about that, but when every object in the scene has a non-one scale it can reduce fps by 2 or 3 times, depending on the object count ofc

tender light
rugged radish
#

personally, never tested in built versions, discovered it randomly and didn't occur to me to see how it works in a build

#

should be pretty easy to test

tiny lotus
rugged radish
#

all my assets are programmer art, but for one of the experiments I had to bake maps at one scale and export the model at a much smaller scale
I'm not sure if that was the question, I'm have very little knowledge regarding asset workflow

tender light
rugged radish
#

oh, I will have to research that myself at some point
I remember reading about render optimizations and one of them mentioned a more efficient way of applying random variations to some of the object properties, including scale

#

DrawMeshInstanced for example, uses standard 4x4 TRS matrices
and I already use it for some environment objects
but I never tested how a non-one scale in that call affects performance because everything has a scale of one

#

varying properties is one of the todo items for me

tiny lotus
#

I do some benchmark with instantiate items with a scale of 1 and other with random scale and there is no different at all ... :/

rugged radish
#

I started my project in built-in, but transitioned to URP later

#

in built-in it gad a huge impact, now there's no impact at all

somber grotto
#

how do i detect how much a number variable is changing in a second on average from the past 10 seconds?

sly grove
somber grotto
#

yeah, but how do i actively keep track of what the value was 10 seconds ago for every second and compare that?

undone coral
#

you would still need to know the name of the thing you are talking about

fresh salmon
#

Just use a coroutine

#

That adds the value to a collection

undone coral
#

unfortunately unirx does not implement Window.

somber grotto
#

the problem is that i want the value to be updated every second

fresh salmon
#

Coroutine with loop in it

somber grotto
#

so every second it would detect what the value was 10 seconds ago and see what it is now

#

how do i store what it was 10 seconds ago all the time without making a huge spaghetti

fresh salmon
#

Maybe a queue would be better here

undone coral
#

you can't dodge the hard problem here

fresh salmon
#

So, simple or overkill way?

undone coral
#

there's no simple way. the simplest would be if unirx implemented Window

#

it doesn't. so you can implement window yourself using Scan, which is too much of a brain explosion

#

compared to doing it in a loop

somber grotto
#

i guess i could make a list of 10 values, then have it set to a value every second and loop back

undone coral
#

there are 3 more - how to have something happen "every second", how to calculate the average (easy), and then how to emit the average "every second"

fresh salmon
#
while (true)
{
    queue.Enqueue(newValue);
    var tenSecsAgo = queue.Dequeue();
    yield return new WaitForSeconds(10);
}

There

undone coral
#

here's an example of how i do it to average a value (in this case, a vehicle speed) over the last 360 frames (m_BufferSize)

somber grotto
#

what is "queue" referencing?

fresh salmon
#

A Queue<T> instance

undone coral
#

you can find an implementation of CircularBuffer online

fresh salmon
#

Which is a collection that is FIFO (first in first out)

undone coral
#

instead of Observable.FixedUpdate you have Observable.Interval(TimeSpan.FromSeconds(1))

#

the reason this method is good is that it solves two hard problems - how ot have something happen every second, or if that isn't good you can do something else, and how to emit the value "at the right time"

#

i don't know what to tell you, it's this hard

#

there are no shortcuts

#

you can of course implement all these things directly

#
  • a circular buffer
  • something that makes a measurement every second
  • something that calculates the average
  • something that "emits" the calculated average every second
#

you can do a circular buffer with a queue

#

you can do a measurement every second with a coroutine

#

you can calculate the average in a coroutine

somber grotto
#

yeah that makes sense, i thought of something pretty simple actually and i'm going to try that

undone coral
#

you can emit the average... uh oh, that one is tricky. surely you want to know when the average changes, you don't want it to stairstep

undone coral
#

define "simple"

#

maybe say it here first

somber grotto
#

yep, but i feel like it might be good enough

undone coral
#

hmm

#

well what is the objective? why do you need this measurement?

somber grotto
#

basically i'm just making a list and having it cycle through and assign a value to each spot and loop it, then just see what the value was 10 spots ago

undone coral
#

i mean gameplay wise

somber grotto
#

the problem is that my idler contains randomly spawned objects that have a bunch of randomness involved and they can be chosen to be collected/not collected, so no way to calculate it from just the spawns

undone coral
#

what are you taking the average of?

somber grotto
#

the objective is to get the money value and see how much it increases every second

undone coral
#

okay

somber grotto
#

just sounds like a simple MpS counter at first, but it's more complicated this time :P

undone coral
#

well a moving average is a pretty typical thing to do, and has a very fixed meaning

#

i don't know if it's something that is often surfaced in idler games

#

the thing i wrote is indeed a moving average

#

with a window size (see, there's that word window again) of 360 (really m_BufferSize) frames

somber grotto
#

pretty much all idle games have this, but the vast majority have the income be a static value of income per second so that's very easy to calculate, they're not actually looking into the value and seeing how much it has changed

undone coral
#
Observable.Interval(TimeSpan.FromSeconds(1f))
  .Select(_ => GameController.instance.Money)
        // this is a tuple
  // scan means, do something every second, and hold onto some
  // state (in this case, the buffer) that we can revisit later
  .Scan((window: new CircularBuffer<float>(10 /*seconds*/), average: 0f), (state, value) =>  {
    var (window, _) = state;
    // circular buffer pushback means
    // the oldest item gets popped off
    // when the newest item is added and you are at capacity
    window.PushBack(value);
                   // the average
           // this is a tuple
                    // this measures the average in the buffer
    return (window, window.Sum() / window.Size);
  })
somber grotto
#

yeah i see, i understand pretty much none of it since i haven't dabbled in more complicated code, haven't ever needed to

undone coral
#

that's as succinct as it can get

#

well

somber grotto
#

so i'll try out my method first and see if i can get it to work

undone coral
#

hmm

#

well i think you'll figure it out

#

@somber grotto well i annotated it for you so that it might make more sense

somber grotto
#

okie, i'll have a look in case my method doesn't work :)

fresh salmon
#

New version

while (true)
{
    _queue.Enqueue(newValue);
    if (_queue.Count > 10)
        _queue.Dequeue();
    
    _average = _queue.Sum() / _queue.Count;
    yield return new WaitForSeconds(1);
}
undone coral
#

^this is pretty close

#

@somber grotto does that snippet make sense to you?

somber grotto
#

i haven't done anything with queues so not really

fresh salmon
#

Think of a queue as a real queue of people

#

You add people at the end of the queue, and you pick people from the start of it

#

It's the same for C#, but it's for values instead of people

#

Enqueue adds a value at the end of the queue
Dequeue removes a value from its start, "sliding the other values forward"

somber grotto
#

oh that's exactly what i'm trying to emulate with a list instead 😄

#

this runs every second on what i have

#

but yeah imma try out what you wrote

somber grotto
#

@fresh salmon how do i pull values from the queue? like with lists you do list[2]

#

nvm i just do .First() and .Last()

sly grove
somber grotto
#

oh i mean like, looking at the values

sly grove
#

foreach or Peek()

somber grotto
#

first and last works, linq helps there

sly grove
#

Indeed, First() might be slower than Peek() though

somber grotto
#

since those are the exact values i'm looking for

#

ah, okie

#

i'm not really concerned about speed since i'm running just one of these

somber grotto
#

@fresh salmon this ended up being my code, MoneyMade is basically just Money but it never gets subtracted from, this way when you buy upgrades the money per second counter doesn't go negative

fresh salmon
#

Nice, thanks for the update!

edgy stirrup
#

Does anyone know what might be wrong with unity ads. I have made all the stuff work in the editor including all the buttons that trigger the adds but when I build it the initialization function does not work. Does anyone have any ideas on what could be causing it? Im pretty sure its nothing got to do with the code itself as the Advertisement.Initialize is a unity function and not written by me and that seems to be the point of failure.

regal olive
#

Hello, I'm Efe Şantay, I'm From Turkey, And My Age İs 11. I'm Doing Trajectory Script, On Unity 5.3.2f1. And My Script Works Like That, İf Tennis Ball Game Object Was OnMouseDown, İt Does, Trajectory.SetActive(true). And İf OnMouseUp, Trajectory.SetActive(false). But My Trajectory Code Gets Error. Error Area This And Error Text: Assets/Scripts/Trajectory.cs(36,40): error CS1501: No overload for method Instantiate' takes 2' arguments. And You Can Look My Code Trajectory.

See? The dotsList [i] = Instantiate (dotPrefab, transform.position, transform.position, Quaternion.identity); İs, Gets Error. What Should I Do In The Correct Version Of This Code? Or, What Should I Choose The Corret Version Of Unity? Please, Help Me And Say The Error's Method For Me, Ok?

And You Can Look Error Pictures Too.

Message By Efe Şantay.

edgy stirrup
#

you need to add Quaternion.identity as a third paramater and a vector3 as a secound paramater

undone coral
edgy stirrup
undone coral
#

are you using a macOS + iOS or windows + android device?

#

it's worth learning how to debug

edgy stirrup
#

widndows + android

undone coral
#

is it a real android device

#

or an emulated one

edgy stirrup
#

real phone

undone coral
#

interesting

#

is your phone weird?

#

did you get it with Weird from the factory?

#

is it rooted?

edgy stirrup
#

its not rooted i dont think

#

the builds work but the ads just dont

undone coral
#

well

#

there's an error somewhere

edgy stirrup
#

most likely

undone coral
#

you have Unity Ads configured for debugging right?

#

meaning even when you deploy it to your phone

#

it should still be in a Debug / Devleopment account

#

not sure what they'd call it

edgy stirrup
#

no i disabled it for the build

edgy stirrup
#

you mean test mode right?

undone coral
#

you have to have test mode on*

#

i guess it's not that obvious

edgy stirrup
#

the same thing happens weather i have it on or not tho

undone coral
#

are you sure

edgy stirrup
#

i did disable it for the build

#

most of the times

undone coral
#

"Note: You must enable test mode before testing ads integration, to avoid getting flagged for fraud."

#

it should always be enabled

#

you should be running test mode until you are in the production lane in google play / released to the app store in ios app store

edgy stirrup
#

oof thanks for telling me that i was doing something very risky

#

im changing it right now

#

ok so im rebuilding it again with test mode enabled

#

Another interesting thing is that the void OnInitializationFaild does not fire either because i did put my logger in there and it did not show up

halcyon schooner
#

So I'm trying to override the currently selected button in my UI, but the selected button in the event systems code either seems to be going slow or keeps updating the same button as selected. Is there any easy way to fix this or diagnose it? I'm using the publisher subscriber method to send all of my information, so I'm not sure if the timings are just somehow off or not. I've tried setting the selected button to null as well but it says it's busy when I do that.

#

The version of Unity I'm using is 2021.3.2f

edgy stirrup
#

by going slow do you mean the game is getting slower or the event is dellayed?

halcyon schooner
#

The event seems delayed.

#

But I'm triggering the events in the correct order.

edgy stirrup
#

do you have any corutines in there?

halcyon schooner
#

No

edgy stirrup
#

does it slow down over time or is it slow as soon as you start?

halcyon schooner
#

So the event gets called but seems to be canceled out by the currently selected button.

#

If I click somewhere with my mouse it will deselect it, but it won't work through the code.

#

Because it says it's "already selecting an object"

severe trail
#

Does anyone have any experience in mesh subtraction and blendshapes?

#

Trying to transfer a blendshape to a mesh with pieces subtracted

edgy stirrup
severe trail
#
  • at runtiem
edgy stirrup
#

does it trigger at all

halcyon schooner
#

The button seems to trigger properly when pressed

edgy stirrup
#

so what is the scenario when it fails

halcyon schooner
#

It triggers the event to switch to another button, but it can't seem to switch buttons, as it is stuck on itself.

edgy stirrup
#

its like it does not deselect properly then

halcyon schooner
#

Seems so, but I can't figure out how to get it to deselect itself before trying to change the selected button.

edgy stirrup
#

Have you looked at the property Interactable in case that mighet get set to false

halcyon schooner
#

I've tried changing the settings on the button, and forcing it through code, but no luck so far.

edgy stirrup
#

there is an alternative way to make your own button component if that is not working for you.

halcyon schooner
#

Hmm

edgy stirrup
#

I can have a look for a link to an article on that its pretty straight forward

halcyon schooner
#

That would be great if I can't get this to work.

edgy stirrup
#

one sec ill have a look

halcyon schooner
#

Maybe the event system is going too slow for the events to trigger one after another, I'll try to convert it to a delayed coroutine real quick.

edgy stirrup
#

I cant find an artical sorry

#

but that is a good idea corutines do run on another thred

sly grove
#

Coroutines do not run on another thread

edgy stirrup
#

oh

#

nvm then

#

thats the thing i was talking about earlier

halcyon schooner
#

The delay worked, so it seems the events didn't want to play nice even though they should have triggered one after the other.

edgy stirrup
#

nice

halcyon schooner
#

Hopefully no one notices a slightly slower inventory. 😅

#

Thanks for the info too, I'll have to look into it. 🙂

quartz stratus
#

@halcyon schooner lol was just throwing down on UI deselection stuff today

#

such a pain

river musk
#

I have a world the size of 5kx5k, I have an image of the world at resolution 1920x1080 at the size of 600x600. I want to place a map marker on this UI map of 600x600 compared to the players position on the world in the 5kx5k area. Who knows how to do this?

quartz stratus
# river musk I have a world the size of 5kx5k, I have an image of the world at resolution 192...

You'd determine the bounds of your world and calculate the players position within them. Say they are at coordinates 1374, 4009 in a 5000x5000 world. So you would then translate that position into the 600x600 space. So multiply each coordinate by the fraction 600/5000. Which gives you a new, re-mapped position in the UI map space: 164.88, 481.08. At least, that's how I'd go about tackling this. Good luck.

river musk
quartz stratus
river musk
quartz stratus
river musk
#

Well like if a player changes screen resolution from 1920 x1080 to something like 900x600 I'd imagine this effects it

quartz stratus
#

Canvas.scaleFactor is a lifesaver.

#

Assuming your UI has its anchors and pivots set properly to scale along with the Canvas.

#

Oh and also need a CanvasScaler component on the same GameObject as your Canvas.

#

Set to scale with screen size

river musk
wet burrow
#

When you're setting up in-app purchases using a ConfigurationBuilder, can you have multiple or do you need to just have one? Do you need to add every single product before initialising, or can you do it in stages?
I've got to procedurally generate and add a massive quantity of products (e.g. thousands across different categories) and I'm wondering how/if I should split them up

somber tendon
#

How would you avoid singleton while keeping your script modular?
Example

 public class A : MonoBehaviour
{
    static public A instance;
    ...
    public System.Action<int i> onDoSomething;

    void DoSomething(int x)
    {
        onDoSomething?.Invoke(x);
    }

    public void UpdateSomething(int y)
    {
        Debug.Log(y);
    }
}

public class B : MonoBehaviour
{
    A.instance.onDoSomething += (int x) => ModifySomething(x);
    
    void ModifySomething(int x)
    {
      x += 1;
      A.instance.UpdateSomething(x);
    }
}

In this way, class A doesn't really care if class B exist or not.
But the use of that singleton worries me since I might unintentionally abuse it later in the future

novel plinth
#

Proly you never heard of factory pattern

#

at the same time, that may not what your game wants... without further context hard to tell

#

and the concept quite the opposite from one to another

sly grove
#

Also what's the problem with a singleton?

somber tendon
# sly grove What's your definition of "modular"?

Modular in a sense that class A doesnt need to know if another class (B) is even exist or not.
Currently I have no problem with a singleton, but considering that some people consider singleton as evil 😝 , I might want to try to avoid it... if possible...
That said, I found that it perfectly suits my intention

deep peak
#

abusing singletons is the way to finish the game to the deadline

somber tendon
wet burrow
#

@somber tendon make sure to use singletons when you know there will only need to be one of it ever

#

Anyone here used the IAP package? Once you initiate a purchase, what would you use to actually initiate whatever the specific purchase does for you? Additionally, how do you ensure a user's purchases are kept between closing and reopening the app? I presume it's stored on a server somewhere? In that case how is it retrieved?

somber tendon
#

or is it better to write like this instead?

public class B : MonoBehaviour
{
    A aInstance;
    void Awake()
    {
      aInstance = FindObjectOfType(A);
      aInstance.onDoSomething += (int x) => ModifySomething(x);
    }
    
    void ModifySomething(int x)
    {
      x += 1;
      aInstance.UpdateSomething(x);
    }
}
wet burrow
#

okay it seems I just use some custom code to determine what the user purchased based on the Product's id

sly grove
somber tendon
rocky mica
#

there is nothing wrong with singletons

deep peak
#

if each new bullet gonna FindObjectOfType your explosion spawner singleton then this will definitely hurt KEKW

#

making one global facade with static access that handles a bunch of singleton components/services is the most cleanest in my opinion

undone coral
#

for example, dependency injection

#
var bullet = Instantiate(bulletPrefab);
// during a match
bullet.gameManagerComponent = GameManagerComponent.instance;
// when looking at the bullet in the inventory screens
bullet.gameManagerComponent = HomeScreenGameManagerComponent.instance;
#

👐 people don't like it not because it's bad, but because it's too simple and they're really doing these cathedrals of engineering in order to procrastinate🌈

rocky mica
#

isnt dependency injection just a fancy word for assigning object references in a Unity context?

#

haha

somber tendon
rocky mica
#

I mean, even if you use interfaces

#

you will need an implementation at some point

somber tendon
#

I'm not using interface atm

sly grove
#

but yeah I think dependency injection is an over-fancy phrase for what the doctor is prescribing

#

though I've seen people use that phrase for it a lot

rocky mica
#

people are way too afraid of singletons tbf

undone coral
#

yeah

#

i am sort of making fun of dependency injection

somber tendon
undone coral
#

unity sort of already does it with [RequireComponent(typeof(T))]

sly grove
undone coral
#

which could in theory just reference a singleton

#

that is its actual dependency injection framework

sly grove
#

So yeah it seems a little milquetoast

undone coral
#
[RequireComponent(typeof(T))]
class B : MonoBehaviour {}

interface IMySingleton {
 int value { get; }
}

class MySingleton : MonoBehaviour {
 // an actual singleton pattern
}

class T : MonoBehaviour, IMySingleton {
 public int value => MySingleton.instance.value;
}
#

but why would anyone bother with this? it's very verbose

#

^that is dependency injection in a nutshell using just unity primitives

#

it just goes to show you don't need any of that stuff in a bare bones sense*, unity ships with it, because the component model is old

undone coral
#

remember Dagger?

#

i'm a maniac though... i use vertx with quasar fibers

#

long ago, when "Project Loom" was just a star in ron pressler's eye, and you could still get venture funding for a java library...

sly grove
sly grove
#

I didn't know about Project Loom until now

#

what is this, goroutines (yes, i.e. Golang) for Java?

#

oh god "Fibers"?

undone coral
regal olive
#

so im wanting to write code that basically detects what website a project is downloaded from, and if its downloaded from anywhere besides the specified websites, it will initiate basically an anti piracy screen (even though its not a paid project, its just supposed to work as an anti reupload measure), i tried looking up a way to do this, but i didnt find anything, and was wondering if anyone here would know how to make something like that

trail cloak
trail cloak
#

Currently I have two of my colleagues working on this bug

#

And we found out another crash point

#

The code that marked purple produce the following crash log:

#
=================================================================
    Managed Stacktrace:
=================================================================
      at <unknown> <0xffffffff>
      at UnityEngine.GameObject:SetActive <0x00153>
      at DEYU.AdpUISystem.Managers.AdpUIPannelManager:PrepareBufferedPannel <0x0050a>
      at DEYU.AdpUISystem.Managers.AdpUIPannelManager:PrepareBufferedPannel <0x000ca>
      at Common.UI.UniversalGameManager:OpenDialogMenu <0x001da>
      at Common.TimelineExtestion.COM_ADialog_Play_Behaviour:OnBehaviourEnter <0x0018a>
      at Common.TimelineExtestion.ExtendedPlayableBehaviour:OnBehaviourPlay <0x0013f>
      at <Module>:runtime_invoke_void__this___Playable_FrameData <0x00259>
      at <unknown> <0xffffffff>
      at UnityEngine.Playables.PlayableDirector:Evaluate <0x00140>
      at Common.TimelineExtestion.GameTimeManager:Update <0x002fa>
      at System.Object:runtime_invoke_void__this__ <0x00187>
=================================================================
Received signal SIGSEGV
Obtained 57 stack frames
0x00007ff610e2f344 (Unity) UI::CanvasManager::AddCanvas
0x00007ff610e436d3 (Unity) UI::Canvas::AddToManager
0x00007ff610e43d05 (Unity) UI::Canvas::AwakeFromLoad
0x00007ff6108cfc27 (Unity) AwakeFromLoadQueue::InvokeAwakeFromLoad
0x00007ff6108cac43 (Unity) AwakeFromLoadQueue::AwakeFromLoadAllQueues
0x00007ff6101aca4a (Unity) GameObject::ActivateAwakeRecursively
0x00007ff6101b3fe9 (Unity) GameObject::SetSelfActive
0x00007ff60fa3d69b (Unity) GameObject_CUSTOM_SetActive
0x0000024f0706f1d4 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.GameObject:SetActive (UnityEngine.GameObject,bool)
high karma
#

Thats very odd error for sure. I suggest reporting the bug on unity.

trail cloak
trail cloak
#
=================================================================
    Managed Stacktrace:
=================================================================
      at <unknown> <0xffffffff>
      at UnityEngine.Transform:SetParent <0x00156>
      at UnityEngine.Transform:SetParent <0x00092>
      at DEYU.AdpUISystem.Managers.AdpUIPannelManager:PrepareBufferedPannel <0x0028a>
      at DEYU.AdpUISystem.Managers.AdpUIPannelManager:PrepareBufferedPannel <0x000ca>
      at Common.UI.UniversalGameManager:OpenDialogMenu <0x001da>
      at Common.TimelineExtestion.COM_ADialog_Play_Behaviour:OnBehaviourEnter <0x0018a>
      at Common.TimelineExtestion.ExtendedPlayableBehaviour:OnBehaviourPlay <0x0013f>
      at <Module>:runtime_invoke_void__this___Playable_FrameData <0x00259>
      at <unknown> <0xffffffff>
      at UnityEngine.Playables.PlayableDirector:Evaluate <0x00140>
      at Common.TimelineExtestion.GameTimeManager:Update <0x002fa>
      at System.Object:runtime_invoke_void__this__ <0x00187>
=================================================================
Received signal SIGSEGV
Obtained 54 stack frames
0x00007ff60bd7cbfd (Unity) UI::CanvasRenderer::UpdateParentHierarchyChange
0x00007ff60b56c01f (Unity) TransformHierarchyChangeDispatch::DispatchSelfAndAllChildren
0x00007ff60b564c0b (Unity) Transform::SetParent
0x00007ff60aa8a188 (Unity) Transform_CUSTOM_SetParent
0x000001c93ff62c37 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Transform:SetParent (UnityEngine.Transform,UnityEngine.Transform,bool)
high karma
trail cloak
#

I see

#

This is the latest LTS version, I didn't expected that to happend

jolly vine
#

Hey everyone! I've created an ocean vertex displacement shader using shader graph, and now Im trying to reference the vertices on the mesh (with the shader material) to make a buoyancy script. However when I reference the vertices, the position of them is set to the default position, without accounting for the shader. Do shaders not modify the properties of the mesh itself, only visually change the object? Is there anyway around this?

trail cloak
#

Shader only visually change the object.

jolly vine
#

dang it

humble leaf
jolly vine
#

Is there anyway around that?

humble leaf
#

So if you're doing gerstner wave calculations in shader, do the same ones with the same values in code at runtime to sample the position.

#

You don't, you run them in tandem.

trail cloak
#

I think you need to write the script for the node...

jolly vine
#

wouldnt it make sense to run the whole shader in code, that way I dont need to run multiple things that do the same thing at once?

jolly vine
#

So unity has ways of accessing those functions in code?

austere jewel
#

The CPU side will only be running samples where it's needed because it's very expensive to run thousands to millions of operations on the CPU

austere jewel
#

the GPU side can do that with ease, but it's extremely expensive to pass that data back to the CPU

jolly vine
#

ok

#

Am I able to access gradient noise functions with code tho?

humble leaf
#

You can't access nodes from code, no. They're just code themselves.

jolly vine
#

I've only used Mathf.Perlin noise in the past

jolly vine
#

and use the same seed

#

to find the height of the ocean vetex's

#

is that correct

humble leaf
#

Yes

jolly vine
#

or does unity have a built in gradient noise function

humble leaf
#

Though,more specifically, the height that is calculated at a specific position.

#

Nothing to do with vertices at this point.

jolly vine
#

true

#

Unity doesn't have a accesable gradient noise function that I can use?

#

I know very very little about how noise fucntions work

jolly vine
#

Trueee

#

I forgot about the shadergraph documentation lol

#

thanks for your help

#

this should be interesting....

humble leaf
#

Honestly, water is one of those things that it's just easier to get an asset for that also supports bouyancy.

jolly vine
#

yeah

#

your probably right

humble leaf
#

Let someone who is a master shader dev solve it for you and get on with your project.

jolly vine
#

your right

#

but I'm poor

#

and I'm up for the challenge

#

and I've tried finding water shaders that I like, and work with what I'm making in the past, and its been hell

#

And I've gotten decently far along making the water so far and it looks good

#

cant give up now!

#

Thanks for your support tho guys, I really appreciate it

#

Unity doesn't make the shadergraph functions public right? So I have to copy and paste all of the code on the shader graph documentation and plug it all into each other?

viral flicker
#

Hey everyone, how do i create a complex combo attack system similar to platinum games in 2d. I have seen tutorial that writes code for playing three different animations in row after input x amount time, but i want to know how to play different animation according to different inputs like for eg pressing x 2 times and y 1 time etc

jolly vine
#

Are you planning on using Unitys animator

viral flicker
#

Yeah, i currently use my own script animation state controller. Dont want to deal with animator web fuckery

jolly vine
#

does anyone know how to access the functions used in the unity shadergraph documentation?

#

when I copy and paste this float unity_gradientNoise(float2 p) { float2 ip = floor(p); float2 fp = frac(p); float d00 = dot(unity_gradientNoise_dir(ip), fp); float d01 = dot(unity_gradientNoise_dir(ip + float2(0, 1)), fp - float2(0, 1)); float d10 = dot(unity_gradientNoise_dir(ip + float2(1, 0)), fp - float2(1, 0)); float d11 = dot(unity_gradientNoise_dir(ip + float2(1, 1)), fp - float2(1, 1)); fp = fp * fp * fp * (fp * (fp * 6 - 15) + 10); return lerp(lerp(d00, d01, fp.y), lerp(d10, d11, fp.y), fp.x); } into my code

#

it gives me a whole lotta errors

#

I added the Unity.Mathmatics namspace, and it fixed some of it

#

but not all of them

devout hare
#

That's written in HLSL, not C#

jolly vine
#

oh

#

well thats not very fun is it

#

I assume I have to just convert it to c# then

novel plinth
#

Shader language has an entirely different concept 🧐

jolly vine
#

ok

lilac arrow
#

hello guys
i want to instantiate 4 objects in the same time randomly and in random position without any repetition
but i have a problem withe the instantiating timing

#

the 4 squares are spawning so fast and not lined under each other

heavy juniper
#

Does parameter col in OnCollisionEnter(Collision col) give information about the surface it hit (whether it is triangle, cube etc.), something that could help me manually calculate surface normal in any way. As one could imagine, Unity docs are very descriptive.

humble onyx
heavy juniper
#

However, based on collision I could maybe get data about what polygon it hit and its vertices.

#

That would be helpful for calculating my own surface normal (actual normal)

humble onyx
heavy juniper
#

Correct, something like this.

#

It doesnt have to be 100% accurate, error of =0.1% or in range of that would be acceptable

heavy juniper
humble onyx
#

(doing some testing with that)

heavy juniper
#

You are in the dome

#

Shooting the walls of the dome from within

#

Its not convex relative to you

humble onyx
#

do you want the normal of the collision mesh or the visible mesh?

heavy juniper
#

Actual mesh, but I would expect them to be the same or am I wrong

#

Ill sketch, one second

humble onyx
#

A convex mesh collider can only have 255 triangles so it might not match your rendered mesh

heavy juniper
#

Hmm that actually be

#

Ill check

#

This is what I am looking for essentialy, an object (capsule) hitting the triangle and getting surface normal of the surface where collision occurred. Red dot is contact point.
I also make it stuck there, so kinematic = true. Could that affect, probably not?

humble onyx
# heavy juniper This is what I am looking for essentialy, an object (capsule) hitting the triang...

I made a small test script that gets the nearest point to a game objects position and gets the normal for that point

using System;
using System.Linq;
using UnityEngine;
public class FindColosestPoint : MonoBehaviour
{
    public MeshFilter Filter;
    // Update is called once per frame
    void Update()
    {
        Vector3 myPos = Filter.transform.InverseTransformPoint(transform.position);
        var lowestValObj = Filter.mesh.vertices
            .Select(x => new { MyObj = x, Value = Vector3.Distance(x,myPos) })
            .OrderBy(x => x.Value)
            .First();
        Vector3 foundPos = lowestValObj.MyObj;
        int index = Array.IndexOf(Filter.mesh.vertices, foundPos);
        Vector3 normal = Filter.mesh.normals[index];
        Vector3 foundPosWorld = Filter.transform.TransformPoint(foundPos);
        Debug.DrawLine(transform.position,foundPosWorld);
        Debug.DrawRay(foundPosWorld,normal,Color.green);
    }
}
#

it should be easy to adapt that to use the collision point instad

heavy juniper
#

Wow thats awesome👌 thank you, will check it in a bit (currently at the restaurant)

humble onyx
#

Good eating 🙂

obsidian glade
#

does the contact point normal really depend on the angle of impact? in a local sense a collision happens between two points (really, one point shared by two surfaces), any velocity should be irrelevant, and indeed the 2 points should provide a normal to the surface as that is largely what a collision is

heavy juniper
obsidian glade
#

I wonder if it's an issue with fast moving projectiles & interpolation

heavy juniper
regal olive
#

Hi, İm Errored On ProjectileDragging Code At (45,72) Area, And Code On İn The First Picture Or İn 2022-08-10(1).png.

And Here's Pictures And My Code:

regal olive
upbeat path
regal olive
upbeat path
#

Sorry, Vector2

#

you are trying to set it with an int

regal olive
#

oh, let me try, it does or doesn't works, İ Back To You Again.

#

İ think İt's Worked, And Here's Updated Version Of My Code:
tennisBallPrefab.GetComponent<Rigidbody2D>().velocity = prevVelocity * 8; // 8 is multiplier to our force.

İt's Like That? İf Yes, Ok. İf No, Ok, Let me try Other Version.

upbeat path
#

as long as prevVelocity is a Vector2

regal olive
#

And İm Created New private Vector2 dir; And İm Tried To tennisBallPrefab.GetComponent<Rigidbody2D>().velocity = prevVelocity * 8; // 8 is multiplier to our force. Code, İt Work's Again.

mint sleet
#
    private IResult ThereIsNoMultipleIntegrationManager(string orgNumber)
    {
        _orgAdminUserService.GetAllByOrgId(orgNumber, "", true, true);
    }
``` Is there any way of sending the true and false values at the same time
#

so it will query both "false" and "true"

upbeat path
regal olive
#

@upbeat path, İ Have A Error Question On You, (55,50) And (56,33) İt's Gets 3 Errors, 3 Errors Code İs: CS0119, CS1502 And CS1503. Here's My Code And Pictures:

upbeat path
wary swift
upbeat path
#

and he should not have pinged me

finite burrow
#

Does anyone here have much experience with MoonSharp for Lua?

function Spin(transform, speed)
    transform.rotation = transform.rotation * Quaternion.angleAxis(speed * Time.deltaTime, Vector3.up);
    return transform
end
UserData.RegisterType<Transform>();
UserData.RegisterType<Transform>();
UserData.RegisterType<Vector3>();
UserData.RegisterType<GameObject>();
UserData.RegisterType<Quaternion>();
UserData.RegisterType<Time>();        
DynValue t = ModLoader.Instance.RunModScript("spin.lua", "Spin", new DynValue[]{UserData.Create(this.transform), DynValue.NewNumber(2)});

getting

attempt to index a nil value
#

I'm under the impression that registering the type is all I need to do for it to contain all it's member data and functions, but because LUA I'm also not sure on which indexer it's failing 😅

sage radish
# finite burrow Does anyone here have much experience with MoonSharp for Lua? ```lua function S...

It could be any one of those. If you have debug information about which line it is, you could split it into multiple lines to find the culprit:

function Spin(transform, speed)
    local up = Vector3.up;
    local deltaTime = Time.deltaTime;
    local angleAxis = Quaternion.angleAxis(speed * deltaTime, up);
    local rotation = transform.rotation;
    rotation = rotation * angleAxis;
    transform.rotation = rotation;
    return transform
end
finite burrow
#

Thanks, that's not a bad shout. Just hope it gives me line number errors instead of bytecode indexes

sage radish
#

I assume you are using some capitalization conversion in MoonSharp to use Quaternion.angleAxis instead of Quaternion.AngleAxis?

finite burrow
#

Yeah, everything gets changed to camelCase in MoonSharp

finite burrow
open yoke
#

Hi...I am looking for a way to run a Standalone Linux build of my Unity app in a Docker container on Ubuntu 20.04

#

I found the GameCI containers but not sure how to deploy my app in it.

#

Any pointers for the same would be much appreciated!

open yoke
#

@undone coral CI/CD essentially. So, start with deploying the Standalone build in a Docker container, run unit and integration tests in Docker and then push to a production container.

undone coral
#

push to a production container?

#

is this a server backend?

#

how does it fit into your game i mean

open yoke
#

Sorry, I meant push to production build. No server, its all local

#

Its a desktop application

#

Completely self-contained.

undone coral
#

a game?

#

it's okay if it's not a game

open yoke
#

Its not a game

#

Just a real-time visualization tool

undone coral
#

okay

#

and it's meant to run on windows? or linux?

open yoke
#

Linux only

undone coral
#

okay

#

that's interesting

#

lol

#

are you streaming this?

#

are you trying to do some kind of streaming?

open yoke
#

yes

undone coral
#

okay

#

do you only need an artisanal quantity of streaming?

#

like an artisanal number of concurrent users, perhaps for the purposes of a demo

#

that usually means 1

open yoke
#

Yes

undone coral
#

okay

open yoke
#

exactly, just 1 user

undone coral
#

do you want to stream from a container?

#

meaning do you want unity standalone to be running inside the container and streaming the video?

open yoke
#

I would be okay to have Unity installed on the Host and simply run the application inside the container

undone coral
#

Unity meaning the editor? i mean the built player

open yoke
#

Oh yes, the built player should run in the container and stream from within the container

undone coral
#

is your goal to stream the rendered visualization from the standalone built player from a container?

#

okay

#

do you know what this is?

#

i think this is unity streaming with instant building from a git / plastic repo and i believe it's currently free

#

and it seems to work on mobile too

#

@open yoke is this helpful?

open yoke
#

Thanks, but not really. I'm looking for a DIY toolchain. Not a web-based solution/product

undone coral
#

i see

#

well i think you'll do a little bit more research on this, what you're describing takes years to develop

#

how do you plan to do the streaming?

undone coral
open yoke
#

No

undone coral
#

it's okay if the answer is no

#

have you successfully streamed from a plain ubuntu bare metal box?

#

i hope this is helpful, i'm just trying to gauge where you are in this journey

undone coral
# open yoke No

have you successfully built a standalone player on a bare metal ubuntu box? was it an empty project or a project that contained your assets?

open yoke
#

Yes I have

undone coral
#

okay that's good

open yoke
#

It was my project

undone coral
#

do you want to add the streaming or has it already worked on bare metal ubuntu?

#

it's okay to be a little grumpy

#

i think this looks easy and it's actually stupendously hard

open yoke
#

Streaming has worked before on the standalone build

undone coral
open yoke
#

Yes

undone coral
#

which package did you use?

open yoke
#

For streaming?

undone coral
#

yes

open yoke
#

Its custom

undone coral
#

can you talk about that some more

#

you'll see that i've been very candid with people about all the approaches in previous chats, for people who have wanted to do this

#

so i don't mean to make this feel like an interrogation, i'm sorry

#

are you streaming to a browser?

hexed meteor
#

I'm trying to budget my memory better .... does anyone know what the memory cost of a material instance is in Unity ?

undone coral
#

@open yoke anyway i'm available to be a resource here, i think if you want an artisanal quantity of users (one user) you should not do CI/CD and you should not try to build into a container. it's important to be candid with your actual use case

open yoke
undone coral
#

or FROM gstreamer TO a unity texture?

#

so you want to stream video INTO a unity texture for rendering inside unity?

regal olive
undone coral
#

people avoid creating material instances because of their impact on rendering duration not memory

undone coral
regal olive
undone coral
#

turn off interpolation and set the cinemachine camera to fixedupdate

#

and set your fixedupdate interval in your physical settings to 1/60

regal olive
hushed fable
undone coral
#

i am honestly not sure why the default isn't 1/60

#

it might as well be

undone coral
#

i believe you that it does

undone coral
#

yeah

hushed fable
#

Being slightly below a common monitor refresh rate is probably good so people find out about these issues

#

IIRC these smoothing methods just don't work very well with objects that are constantly changing their speed

undone coral
#

it's okay if you don't want to talk about this though @open yoke ... i probably know a lot more about this than anyone else you've talked to

undone coral
#

what's the gameplay purpose of that?

#

@open yoke i'll just caution that the game-ci docker containers don't really successfully build most complex projects, especially on linux

#

they are used mainly in github actions which are VM runners

#

you can use github actions with your own runner if that's what you want

regal olive
hushed fable
brazen umbra
#

guys how can i check object like OnTriggerEnter?

undone coral
#

i would use an asset for this stuff since it's so idiosyncratic

livid kraken
#

Isnt the Unity Render Streaming package supposed to handle this sort of use case ?

regal olive
undone coral
#

i think people put themselves into an absolute colossal amount of jeopardy doing a demo for someone showing streaming of 1 user

#

and assuming this stuff can scale

regal olive
#

thanks

#

now its not doing jittery stuff

undone coral
#

i think moverotation may not consider the "incomplete" physics you have with the add forces

#

i'm nto sure

#

there's a way to do this

deep peak
#

you can try freeze rigidbody rotation and rotate the gameobject instead of the rigidbody

#

or you may have to use AddTorque instead of setrotation

undone coral
regal olive
hushed fable
#

Setting the rotation will likely break interpolation. Afaik the result is the same with AddTorque

buoyant leaf
#

is there a way to delink particles from their attached transform?

undone coral
#

you can simulate shuriken into world space

#

and use a parent constraint to control its transform settings

buoyant leaf
#

well its not, but yeah I want the particles to move non-relative to their parent

undone coral
#

is it shuriken or vfx graph?

buoyant leaf
#

so if the parent suddenly moves, the particles stay on their path and don't follow the parent

#

unity's particle system?

undone coral
buoyant leaf
#

didn't know it's called shuriken

undone coral
buoyant leaf
#

how?

undone coral
#

okay well the betetr question is what's the effect?

buoyant leaf
#

ngl I am not that well versed in the particle system

buoyant leaf
undone coral
buoyant leaf
#

gimme a second

#

I want it so when I move the object the particles don't follow

#

i don't want this

undone coral
#

it's a checkbox

buoyant leaf
#

where?

#

found it

#

thank you so much

#

looks much better

livid kraken
undone coral
#

the underlying streaming approach is flawed in some ways but not insurmountable ones and the developer on it is trying to fix that

livid kraken
#

We have a metaverse client and I keep trying to explain that tje scales they want wont work on webgl so Im looking into solutioms

undone coral
#

The rest would be handling spining up all the virtuals to scale
i think people underestimate this challenge not by 10% or even 100%, but by 1000%

livid kraken
#

I dont underestimate it at all

undone coral
livid kraken
#

Thats why I plan to pay a platform to do it if and when we need it

undone coral
#

it is free right now afaik

livid kraken
undone coral
#

the reason i know it's free is because i develop it lol

#

i know a lot about this stuff

#

two guys here were trying to use agora and were in a great deal of jeopardy

#

you can see that i've contributed to com.unity.webrtc, the underlying streaming approach from the unity renderstreaming package

livid kraken
undone coral
#

some guys are experimenting with the later and are quite happy

undone coral
#

i think there are certain concerns, especially for a global game, that make that complicated

#

you would probably deploy the backend side-by-side with the player instances, we run our own hardware in the US

#

but it's very painless to try. you connect your git or plastic repo, add our plugin as a unity package, and it'll be built and deployed

#

no pressure though

livid kraken
#

Can the tech be used in a established cloud ?

undone coral
#

i think if you try to do this yourself, you're going to figure out everything except how to get it to run efficiently, that is what i focus on

undone coral
livid kraken
#

Ok cool. Well I'll def tell the relevant dev team to check it out

open yoke
undone coral
#

what's the objective? is there on screen output?

#

i can be really helpful but you gotta give me the big picture here of what you're actually doing

hallow turtle
#

can anyone good with photon help me with getting a function to go off for master client? i have a maze type thing made by photon.instantiate and now im trying to destroy it all when game wins and make new maze

#

it works if master wins but if anyone else does it throws errors

#

my rpc wont work

#
    {
        PhotonView pv = this.gameObject.GetComponent<PhotonView>();

        //GameObject.Find("ThreeOfClubs").GetComponent<CreateThreeOfClubs>().DestroyGame();
        pv.RPC("MasterDestroy", RpcTarget.MasterClient)); //player1 = PhotonView.Find(1001).gameObject;
}
#
    void MasterDestroy()
    {
        if (!PhotonNetwork.IsMasterClient)
        {
            throw new InvalidOperationException($"Only master can perform this action");
        }
        DestroyGame();
    }

    public void DestroyGame()
    {
        GameObject[] walls;
        walls = GameObject.FindGameObjectsWithTag("Wall");
        foreach (GameObject wall in walls)
        {
            Destroy(wall);
        }
        Destroy(GameObject.Find("Win(Clone)"));
    }```
unique ermine
#

Not sure if that's the right place to ask but it seems advanced
I'm not sure how anyone can help me but perhaps there are some smart people here.
I'm developing in unity.
I'm currently trying to make a clothing system where I can swap meshes(clothing) at runtime. This itself is not that hard I imagine but it gets a bit more complex now.
Imagine an inventory where you see your player character full body with the working clothing system, so far so good.
But in my game you actually play in first person, as it's a shooter.
This means I only have the player arms & weapon in first person.

what's the problem? how the fuck would I attach the clothing from the full body mesh to the fps arms, so when you wear a white t-shirt it would be visible on the arms.
perhaps this is important : The fps arms are taken from the player full body, so they have the same bone structure if that's important
is that even possible?
one way to 'fix' that problem would be that everytime players create a clothing item, they also have to make a second version just for the fps arms, if that's visible in first person.

undone coral
wary swift
#

Same goes for animations

#

What looks good in 3rd person usually looks bad in 1st person

unique ermine
unique ermine
unique ermine
# undone coral yes

Ah sad to hear. Thought it’s somehow possible to extract it from the full body and make it work somehow

#

Thanks a lot

tawdry dome
#

i am trying to create my own city building game (like cities skylines), and i am thinking of ways how to save terrain data, is there a way to store it in .png files each pixel is point in my grid and height is represented in 24bit integer (0 - lowest possible point, 2^24 highest possible point)

undone coral
tawdry dome
undone coral
#

you can modify at runtime, save and load the terrain height and splatmaps

tawdry dome
#

ok

#

so can i use .png file to save heightmap?

undone coral
#

yes

#

you can get a texture2d as png bytes using built in unity functions

#

EXR might be a better choice. depends what you're going to do with the images

undone coral
#

it is simpler to use RHalf or RFloat

tawdry dome
#

i was thinking of saving it in RGB24

undone coral
#

you COULD

#

but there's a format that gives you exactly what you want unambiguously

tawdry dome
#

ok

undone coral
#

This isn’t a place you want to innovate is it

#

I mean the image format

#

It’s a long journey

tawdry dome
#

ok

#

i should look into how to do it now

meager kite
#

is there a more performant way for a newly instantiated object to find my GameManager object in the scene than to call FindObjectOfType?
because it can lag a lot when each newly instantiated object has to look through a ton of others just to find the GameManager

high karma
#

Save it on a variable at start method. Then access that variable on your other script.

meager kite
#

yeah thats what i meant by call FindObjectOfType, i might have tens of thousands of objects at a time and even one search can seriously drop frames

deep peak
#

usually GameManager and similar classes are singletons, there is only one instance of them can exist (its your responsibility to enforce this though), and they have a static field referencing themselves, and other script access them through that static field

short atlas
#

Is there a way for me to change a value of a variable that's local to a function from the onClick() event? Like is there a way for me to write something like "gameObject.GetComponent<Button>().onClick.AddListener(myFunction.value = 2)" or something?

#

I heard of a way that included delegating that function and creating a marker but it won't let me set the marker to an actual int or str...

turbid tinsel
short atlas
#

The thing is, I first need to change the variable of a function once the button is clicked because the buttons are generated at runtime, which first of all is why I need to access the onClick() via code, and each button has a value that I want it to display once I click it and if I click the next one, then the next value should be displayed so I'm kind of confused on how I should add this to the onClick().

turbid tinsel
#

You can add a function to onclick, that will take the text component and the desired value as parameters, and then assign the desired value to the text component inside it

#

I dont think changing a variable local to a function is something that makes sense in your scenario

short atlas
#

the displaying text was just an example but in other words i just need to generate a value once a button is clicked

#

but the value that I need is calculated by the function that generates the buttons and i cant just call that whole function at onClick() which is why i needed it to change a local value at onClick() instead.

#

so i was hoping there was a method to store a value along with the generated button that can be fed back to a function on the onClick() event.

turbid tinsel
#

Try button.OnClick.AddListener(() => MyFunction( somevalue, someothervalue, anythingyouwant));

#

MyFunction will be called with those parameters on click

short atlas
#

alright let me try

meager kite
short atlas
#

yeah that still won't work because the parameter I pass is actually a mini algorithm so it needs to be under the conditions of the other function to work properly, otherwise if its ran casually it returns a random value.

turbid tinsel
#

well you gotta put it in another function, no other way

#

either pass the result or implement it in the other function somehow

undone coral
#
var myvar = 0;
gameObject1.GetComponent<Button>().onClick.AddListener(() => {
 // this works
 myvar += 1;
});
gameObject2.GetComponent<Button>().onClick.AddListener(() => {
 // this still works
 myvar += 2;
});
#

it's the same value between the two functions

turbid tinsel
#

do you need the value be changed after clicking each button?

#

so that the first button would display 1, next one 3 etc

#

if yes, you need to make a variable outside of the function
and pass in just the 1, 2 etc
and modify the variable in the other function

short atlas
#

so I have a nested for loop in a function that generates buttons, and I have a mini algorithm that tags those buttons. I also want the buttons to return the value they are tagged with when they are clicked, but that value is calculated once, and its when the button is generated.

undone coral
#

a nested for loop in a function that generates buttons
are you trying to say you are experiencing a problem using your index i in a lambda?

short atlas
#

no clue what you just said lmao

undone coral
#

this is apparently a very common issue

#

just post your code

short atlas
#

alright ill post snippets

high karma
turbid tinsel
#

Why dont you do
var myvar = 0
button.onclick.addlistener ({MyFunction(myvar)});
myvar += 1;
button.onclick.addlistener({MyFunction(myvar)});
etc etc

#

as long as myvar isnt a reference it'll work

undone coral
#

we'll see what the code is

#

we're about to find out

#

what this mystery question

#

is really getting at

high karma
#

lol

undone coral
#

my bet is it's an index in a listener problem

turbid tinsel
#

just post the whole function code

high karma
#

Yeah im kinda confused what hes trying to do.

short atlas
#
spawnedTile.name = $"{chars_index[focal_sector[focal_sector_indexer] + sub_val]}";
spawnedTile.GetComponent<Button>().onClick.AddListener(() => InputParser($"{chars_index[focal_sector[focal_sector_indexer] + sub_val]}"));

ABOVE IS THE THING TO TAG THE BUTTONS

#

formats gone off lmao

undone coral
#

hmm

#

there's no for loop in here

#

show us the whole loop

#

it's looking EXTREMELY likely though

short atlas
#
    {

        for (int x = 0; x < width; x++) //Loops over width
        {
            for (int y = 0; y < height; y++) //Loops over height
            {
                var spawnedTile = Instantiate(button,new Vector3(x * 290 + spawnOffsetX,y * 230 + spawnOffsetY), Quaternion.identity);
                spawnedTile.transform.SetParent(GenController.transform);

                if (n == 4)
                {
                    focal_sector_indexer++;
                }
                
                if (n == 8)
                {
                    focal_sector_indexer++;
                }

                focal_sector_indexer = Mathf.Clamp(focal_sector_indexer,0,2);

                (spawnedTile.transform.GetChild(0).gameObject.GetComponent<TextMeshProUGUI>()).text = $"{chars_index[focal_sector[focal_sector_indexer] + sub_val]}";
                spawnedTile.name = $"{chars_index[focal_sector[focal_sector_indexer] + sub_val]}";
                spawnedTile.GetComponent<Button>().onClick.AddListener(() => InputParser($"{chars_index[focal_sector[focal_sector_indexer] + sub_val]}"));

                sub_val -= 3;

                if (sub_val < -9)
                {
                    sub_val = 0;
                }
                
                (spawnedTile.transform.GetChild(0).gameObject.GetComponent<TextMeshProUGUI>()).fontSize = 200;
                n++;
            }
        }
    }```
undone coral
#

focal_sector_indexer = Mathf.Clamp(focal_sector_indexer,0,2);
hmm

#

okay

short atlas
#

oh that part can be deleted

undone coral
#

all you have to do @short atlas

short atlas
#

no need for that

undone coral
#

well

#

i mean that clearly makes a huge difference

#

but okay

#

here's all you have to do

short atlas
#

nah cause it never reaches outside the boundary

#

but this loop just generated the buttons

#

and it tags them accordingly

#

but i want to make the value they are tagged with the return value of the onCLick()

undone coral
#
var finalSubVal = sub_val;
var finalFocalSectorIndexer = focal_sector_indexer;
spawnedTile
 .GetComponent<Button>()
 .onClick.AddListener(() => InputParser($"{chars_index[focal_sector[finalFocalSectorIndexer] + finalSubVal]}"));
#

i think it's going to be incomprehensible to you

#

to use the technical words

#

for what we are doing here

#

but all you have to know is, if you want the value of something like "focal_sector_indexer" at the "same time" as when you create your listener "function", you have to copy that value to a new variable.

#

okay? does that make sense?

#

problem solved

#

you just don't know about this problem

#

you're like the third person in the last 24 hours to have it

short atlas
#

yeah this is slightly confusing

#

its cause i dont see why i need a final sub val when thats just a value to help calculate a certain position in a chars_index

undone coral
#

guys help me

short atlas
#

cause its not the loop that doesnt work

undone coral
#

i know, i mean i fixed your problem

short atlas
#

okok ill try

undone coral
#

but you don't yet comprehend why

#

part of it is you write code like a crazy man

#

part of it is that you're not really aware of what the code means

short atlas
#

lmao people say that always

undone coral
#

for example do you know what () => {} is called?

#

it's okay if you don't know

high karma
short atlas
#

i remember using it in java

undone coral
#

lol

#

yes

#

it's a lambda!

#

that's right

short atlas
#

inline function or smthn

undone coral
#

it is in java

#

no it's a lambda

#

it's not an inline function

#

but close enough

#

when you declare a lambda you have curly braces right?

#

that's a scope

short atlas
#

yeah

undone coral
#

look at the variables you're referencing, are they declared inside the scope of the lambda?

#

no.

#

not in your original code

short atlas
#

ah

undone coral
#

so those two variables

#

focal_sector_indexer and sub_val

short atlas
#

lmao i didnt even think you could do this in c#

undone coral
#

every lambda looks at the same name and reads the same value

#

it doesn't get copied over

#

you need a new name for a new value

#

that's why we're doing var there

#

because the code inside your lambda hasn't executed yet

#

you should notice that too

#

so it's not like it "copies" just because you wrote the code (that's impossible)

#

anyway i was right

#

this was your issue

short atlas
#

ok let me see if it works

undone coral
#

i mean

#

i don't know if it's going to work

#

because i can't make heads or tails of what this for loop is supposed to do

#

incidentally if you had just done

var input = $"{chars_index[focal_sector[finalFocalSectorIndexer] + finalSubVal]}";
spawnedTile
 .GetComponent<Button>()
 .onClick.AddListener(() => InputParser(input));
#

you would have accidentally correctly dealt with the lambda closure pass-by-reference issue

short atlas
#

damn ill look into all this more now that you mentioned it

undone coral
#

i don't know if chars_index changes over time though

#

i have NO IDEA what's going on in this code

#

lol

short atlas
#

nah chars_index is just an array

#

doesnt change

undone coral
#

okay so problem solved

short atlas
#

BRO

#

THANK YOU

undone coral
#

but do you understand

short atlas
#

damn if you dont mind could you explain it again? i'd like to understand the lambda pass.

undone coral
#

lol

#

okay

short atlas
#

lmao

undone coral
#

it's okay

#

when you do

for (var i = 0; i < 10; i++) {
 var button = Instantiate(buttonPrefab);
 button.AddListener(() => {
   Debug.Log(i);
 });
}
#

every button will log "10"

#

because there's only one variable i, and they're all referencing the same variable i

#

when you declare the lambda () => {...} it DOES NOT copy the value of i in some snapshot of time

#

it just says, "where is the name i?"

#

"what is the value of the name i"?

#

does that make sense?

#

once you exit the for loop, i == 10

#

so when you click the button, you run Debug.Log(i), and it's 10

short atlas
#

yeah, thats what i was trying to say 😂 that it wasnt capturing it from a snapshot in time but rather calling it on the onClicked()

undone coral
#

it doesn't matter that at the moment you created the lambda, the value of i was 1 or 3 or whatever

#

yes

#

so to deal with this, because this is almost always what you want:

for (var i = 0; i < 10; i++) {
 var button = Instantiate(buttonPrefab);
 var finalI = i;
 button.AddListener(() => {
   Debug.Log(finalI);
 });
}
short atlas
#

ohhhhh

#

i see

undone coral
#

bUt tHe nAmE finalI iS tHe sAmE

#

well, it is declared anew every execution of the for loop

short atlas
#

so you clone 'i' in that moment in time and leave that clone unaffected

#

bro this is making so much sense

undone coral
#

so there are 10 finalIs, one belonging to each lambda

#

with a copy of the value

#

okay great

short atlas
#

lmao tell ur boss to give you a raise

#

if you work

undone coral
#

it's called final because this is an error in java, and you fix it by declaring an "effectively final" or "final" variable

undone coral
short atlas
#

i just met a messiah

undone coral
#

don't worry you will thrive

#

keep on programming like a crazy man

short atlas
#

ahahah appreciate it

#

anyway thanks.

brazen umbra
#

guys any way to check this gameObject is raycasted or not?

wooden cedar
#

Did you cast a ray and hit it?

slender stag
#

👋 Hello, I opened a project that I haven't worked on in a while and it looks like the .meta file for a dll was filled with null bytes

#
The .meta file Assets/Core/TankCore.dll.meta does not have a valid GUID and its corresponding Asset file will be ignored. If this file is not malformed, please add a GUID, or delete the .meta file and it will be recreated correctly```
#

Screenshot from VSCode

#

Unity went into Safe Mode, but how can I get the guid of the file through the asset database, because I cannot do much when the editor is in safe mode (Edit: Editor scripts also do not work, any other way to access the asset database to get the guid?)

austere jewel
#

If it's just full of null bytes there's nothing you can do apart from deleting the file and letting Unity remake it

#

and hoping nothing was explicitly referencing it via GUID

#

@slender stag

slender stag
#

It contains monobehaviours that is in my scenes

#

So idk if deleting it will unassign (or make them missing)

austere jewel
#

I have no idea, but if you are using source control surely you can revert it

slender stag
#

I mean, if I had source control, I wouldn't be asking for help lmao (I wish I used it though)

#

Is there a way to browse the AssetDatabase directly?

austere jewel
#

Unity uses the GUID in the dll's meta file to resolve the scripts. (and uses the file ids it generates from the full names of the classes in it)
You're going to have to find where you've used a script in your game and look at the file (be it a prefab, scene, or scriptable object file) to find the GUID that it's trying to reference

#

You're then going to have to delete that broken meta file, and get Unity to generate a new one.
Then you're going to have to close Unity, and replace the GUID it generated with the one you found.

#

You're going to have to do manually through text. I do small modifications with Rider fairly often with its find and replace as it's fast as hell for that sort of thing.

#

You should really start using source control, because reverting a single file change certainly is easier than going through this rigmarole 😛

slender stag
#

Found common guid: b01367d0e380e624084e66cbfccc2546

#

And yes ima add it to the repo lol (This was a side project, decided it was not necessary to add to the git repo... till now lol)
🤞
Status: Done!

slender stag
#

It works!!!

livid kraken
#

Anyone know what is SRPBatcher.Flush and what does it do? This is running GLES3.2 on Oculus Quest 2

#

it seems to be connected to the reflection probe settings on the mesh renderers. With off I'm not seeing it

fresh vortex
#

how can i get count of non-persistent UnityEvent listeners?

regal olive
fresh vortex
#

and there is huge ongoing topic already

novel plinth
fresh vortex
#

bet you didint read it

novel plinth
#

oh haha 🤣

#

either way, easy to tackle, no?

#

Make a List.. each time you add the Listener, add it to the list as well

#

or just an int as a counter, that would do the trick too

wispy terrace
#

I've got a base class from which many other classes derive from:

brazen umbra
wispy terrace
#

But when I create an instance of the class, the lists are empty:
allFurniture.Add(new Furniture("chair", "Chair", new string[] { "wood", "basic", "brown", "cheap", "rustic" }, new string[] { "sit" }, null, null, null));

#

Everything else gets set correctly. My first aproach was to ask for the lists directly on the base class constructor and assign them plus any derived class could add additional entries to the lists in their own constructor, but it didn't work

fresh salmon
wispy terrace
#

Just noticed, thanks

#

But that doesn't solve the issue

#

They both are empty at the end

#

And I am definetly adding entries in, at least, one

fresh salmon
#

Place a breakpoint on the constructors, and step through

#

I don't see anything wrong with the code rn

wispy terrace
#

Yup there is nothing wrong with the code, however, there is definetly something wrong with me xD

#

Found it, human error

wispy terrace
livid kraken
#
 Texture2DArray textureArray = new Texture2DArray(textures[0].width, textures[0].height, textures.Length, TextureFormat.ETC2_RGB, true);
       
        for (int i = 0; i < textures.Length; i++)
        {
            for (int j = 0; j < textures[i].mipmapCount; j++)
            {
                var mipData = textures[i].GetPixelData<byte>(j);


                textureArray.SetPixelData(mipData, j, i);
            }
           
           
        }
        textureArray.Apply(false);
``` Any idea why this adds a full white alpha to each slice in the texture array even when the source textures have no alpha ?
livid kraken
#

actually something fucky is going on. enve if I set every element of mipdata to 0

#

the alpha is there in the editor

#

the displayed size does not shrink as well

#

but if I open up the asset, its all 0

#

not a single 255 or f

brazen umbra