Programmieren & Softwareentwicklung

Wenn Du nicht nur Anwender sein willst, sondern auch aktiv programmierst oder mit dem Gedanken spielst, dann warten hier die passenden Fragen und Antworten auf Dich.

26.809 Beiträge

Unity Fehler mit script?

Ich arbeite aktuell an einem Game in Unity und benutze dafür eine Pixel Perfect Camera, da diese aber nicht flüssig bewegt benutze ich ein Script was das fixen soll.

Das Problem ist, dass ich dabei einige Fehlermeldungen erhalte und die Sceneview während das Game läuft schwarz ist.

Screenshot vom Problem:

Fehlermeldungen:

Scene view texture is null
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

ArgumentException: Graphics.SetRenderTarget called with depth RenderBuffer from screen and color RenderBuffer from RenderTexture
UnityEngine.Graphics.Internal_SetRTSimple (UnityEngine.RenderBuffer color, UnityEngine.RenderBuffer depth, System.Int32 mip, UnityEngine.CubemapFace face, System.Int32 depthSlice) (at <10871f9e312b442cb78b9b97db88fdcb>:0)
UnityEngine.Graphics.SetRenderTargetImpl (UnityEngine.RenderBuffer colorBuffer, UnityEngine.RenderBuffer depthBuffer, System.Int32 mipLevel, UnityEngine.CubemapFace face, System.Int32 depthSlice) (at <10871f9e312b442cb78b9b97db88fdcb>:0)
UnityEngine.Graphics.SetRenderTarget (UnityEngine.RenderBuffer colorBuffer, UnityEngine.RenderBuffer depthBuffer, System.Int32 mipLevel, UnityEngine.CubemapFace face, System.Int32 depthSlice) (at <10871f9e312b442cb78b9b97db88fdcb>:0)
UnityEngine.Graphics.SetRenderTarget (UnityEngine.RenderBuffer colorBuffer, UnityEngine.RenderBuffer depthBuffer) (at <10871f9e312b442cb78b9b97db88fdcb>:0)
UnityEditor.SceneView.DoOnGUI () (at <35c0e5f206594d2fa707969117964d70>:0)
UnityEditor.SceneView.OnSceneGUI () (at <35c0e5f206594d2fa707969117964d70>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <b8c852c145a8456ba2512bf23f96ab0b>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <b8c852c145a8456ba2512bf23f96ab0b>:0)
UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () (at <b8c852c145a8456ba2512bf23f96ab0b>:0)
UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams drawParams, System.Single pixelsPerPoint, System.Exception& immediateException) (at <b8c852c145a8456ba2512bf23f96ab0b>:0)
Rethrow as ImmediateModeException
UnityEngine.UIElements.UIR.RenderChain.Render () (at <b8c852c145a8456ba2512bf23f96ab0b>:0)
UnityEngine.UIElements.UIRRepaintUpdater.Update () (at <b8c852c145a8456ba2512bf23f96ab0b>:0)
UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at <b8c852c145a8456ba2512bf23f96ab0b>:0)
UnityEngine.UIElements.Panel.UpdateForRepaint () (at <b8c852c145a8456ba2512bf23f96ab0b>:0)
UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at <b8c852c145a8456ba2512bf23f96ab0b>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <b8c852c145a8456ba2512bf23f96ab0b>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <b8c852c145a8456ba2512bf23f96ab0b>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <b8c852c145a8456ba2512bf23f96ab0b>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <b8c852c145a8456ba2512bf23f96ab0b>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <de482c2695fe43d4bc4f288c4be45137>:0)

Editor Camera already has a render stack set... recursive rendering?
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Camera stack state already exists... rendering has not been configured properly
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Das Script, das ich verwende:

https://github.com/DasToblerone/SmoothPixelPerfectCamera

Danke schonmal im voraus!

Bild zum Beitrag
Ask Me Anything: Themenspecials

Was kann ich bei dem Fehler beim Firmware flashen auf einem Ender 5 pro tun (Siehe Beschreibung)?

Ich möchte klipper zum Laufen bringen

Firmware Configuration:

Mc Architecture: STM32

Processor: STM32F103

Bootloader offset: 28KiB

Commuication interface: USB (on PA11/PA12)

###### Flashing /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0 ...

###### Stop klipper.service ...

[✓ OK] Stop klipper.service successfull!

Flashing out/klipper.bin to /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0

Entering bootloader on /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0

Device reconnect on /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5:1.0/tt yUSB0

sudo dfu-util -p 1-1.5 -R -a 2 -D out/klipper.bin

dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.

Copyright 2010-2016 Tormod Volden and Stefan Schmidt

This program is Free Software and has ABSOLUTELY NO WARRANTY

Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Invalid DFU suffix signature

dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!

dfu-util: No DFU capable USB device available

Failed to flash to /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0: Error running dfu -util

If the device is already in bootloader mode it can be flashed with the

following command:

make flash FLASH_DEVICE=1eaf:0003

OR

make flash FLASH_DEVICE=1209:beba

If attempting to flash via 3.3V serial, then use:

make serialflash FLASH_DEVICE=/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0

make: *** [src/stm32/Makefile:111: flash] Error 255

>>>>>> Flashing failed!

>>>>>> Please read the console output above!