Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom playfield mesh not showing up #14

Open
shntat opened this issue Jun 29, 2022 · 7 comments
Open

Custom playfield mesh not showing up #14

shntat opened this issue Jun 29, 2022 · 7 comments

Comments

@shntat
Copy link

shntat commented Jun 29, 2022

Cannot use custom play-field mesh. It does not show up after turning off the auto-generated play-field mesh

@freezy
Copy link
Member

freezy commented Jun 29, 2022

Thanks! PR welcome :)

@shntat
Copy link
Author

shntat commented Jun 29, 2022

In the picture i am trying to use a custom playfield as described in the vpe documentation.
The behavior i am seeing is that when I change the playfield mesh to my custom mesh it does not show up where the original auto generated one did. When i put the custom mesh in straight into unity it shows up but does not work when i add the vpe components to the mesh.
When i add The Playfield common components do not attach to the playfield surface. So the custom mesh playfield does not work.
Screenshot 2022-06-29 133158

@shntat
Copy link
Author

shntat commented Jul 1, 2022

I think i may have found the issue with a custom playfield.
I have added the correct components for the table and playfield.
When i add anything from the toolbox the origin point is way below the normal origin for toolbox items and rotated 90`
Still have issue with changing the playfield mesh like in above picture
Seems like the coordinate system for the playfield is broken When using a custom playfield.
So how do i fix this issue?

Screenshot 2022-07-01 063000

1 similar comment
@shntat
Copy link
Author

shntat commented Jul 2, 2022

I think i may have found the issue with a custom playfield.
I have added the correct components for the table and playfield.
When i add anything from the toolbox the origin point is way below the normal origin for toolbox items and rotated 90`
Still have issue with changing the playfield mesh like in above picture
Seems like the coordinate system for the playfield is broken When using a custom playfield.
So how do i fix this issue?

Screenshot 2022-07-01 063000

@shntat
Copy link
Author

shntat commented Jul 2, 2022

any chance of creating a base template for a playfield that can use a custom non auto generated mesh?

@shntat
Copy link
Author

shntat commented Jul 2, 2022

ok I Think i figured out something good on the custom playfield. I turned off auto generate and assigned a transparent material . I then i completely Unpacked the custom playfield prefab and placed the contents under the playfield object as in the picture.
but now the error i get in 2021.3.0f1 is :
Screenshot 2022-07-02 163354

ArgumentException: Unknown VisualPinball.Unity.IPhysicsEngine engine (available: [ VisualPinball.Unity.DefaultPhysicsEngine ]).
VisualPinball.Engine.Common.EngineProvider`1[T].Set (System.String id) (at Library/PackageCache/[email protected]/VisualPinball.Engine/Common/EngineProvider.cs:94)
VisualPinball.Unity.Player.Awake () (at Library/PackageCache/[email protected]/VisualPinball.Unity/VisualPinball.Unity/Game/Player.cs:153)

ObjectDisposedException: The UNKNOWN_OBJECT_TYPE has been deallocated, it is not allowed to access it
Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckDeallocateAndThrow (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle) (at <1332c534a8a44623b2e5cc943a0b790e>:0)
Unity.Collections.LowLevel.Unsafe.DisposeSentinel.Dispose (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle& safety, Unity.Collections.LowLevel.Unsafe.DisposeSentinel& sentinel) (at <1332c534a8a44623b2e5cc943a0b790e>:0)
Unity.Collections.NativeHashMap`2[TKey,TValue].Dispose () (at Library/PackageCache/[email protected]/Unity.Collections/NativeHashMap.cs:312)
VisualPinball.Unity.SimulateCycleSystemGroup.OnDestroy () (at Library/PackageCache/[email protected]/VisualPinball.Unity/VisualPinball.Unity/Physics/SystemGroup/SimulateCycleSystemGroup.cs:105)
Unity.Entities.ComponentSystemBase.OnDestroy_Internal () (at Library/PackageCache/[email protected]/Unity.Entities/ComponentSystemBase.cs:198)
Unity.Entities.World.DestroyAllSystemsAndLogException () (at Library/PackageCache/[email protected]/Unity.Entities/World.cs:413)
UnityEngine.Debug:LogException(Exception)
Unity.Debug:LogException(Exception) (at Library/PackageCache/[email protected]/Unity.Entities/Stubs/Unity/Debug.cs:19)
Unity.Entities.World:DestroyAllSystemsAndLogException() (at Library/PackageCache/[email protected]/Unity.Entities/World.cs:417)
Unity.Entities.World:Dispose() (at Library/PackageCache/[email protected]/Unity.Entities/World.cs:156)
Unity.Entities.World:DisposeAllWorlds() (at Library/PackageCache/[email protected]/Unity.Entities/World.cs:174)
Unity.Entities.DefaultWorldInitialization:DomainUnloadOrPlayModeChangeShutdown() (at Library/PackageCache/[email protected]/Unity.Entities/DefaultWorldInitialization.cs:94)
Unity.Entities.DefaultWorldInitializationProxy:OnDisable() (at Library/PackageCache/[email protected]/Unity.Entities/DefaultWorldInitializationProxy.cs:29)

@shntat
Copy link
Author

shntat commented Aug 11, 2023

Screenshot 2023-08-10 200627
Still not able to use custom playfield. It would be nice to be able to use the playfield i created using the documentation.
How do i add a custom playfield shape? The custom mesh is smaller than the auto generated one. Also it is rotated the wrong direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants