edited January 2020 in ORK Support
Hi GiL,

I recently run into one of those weird random appearing errors that came up this lovely day whenever I open my Menu with 'Combatant' displaying Portrait in form of his 3d prefab.

ArgumentNullException: Argument cannot be null.
Parameter name: textureToCopy
UnityEngine.RenderTexture..ctor (UnityEngine.RenderTexture textureToCopy) (at C:/buildslave/unity/build/Runtime/Export/Texture.cs:121)
ORKFramework.UI.PrefabViewCameraSettings.CreateTexture ()
ORKFramework.UI.CombatantPrefabViewInstance.Init ()
ORKFramework.CombatantPrefabViewPortrait.Init ()
ORKFramework.GUIBoxContent.InitializePortrait (IPortrait portrait)
ORKFramework.HUDStatus.CreateLabels (ORKFramework.GUIBox box, System.Collections.Generic.List`1& label, Rect displayBounds, ORKFramework.Combatant combatant, Boolean isBestiary)
ORKFramework.UI.MultiHUDContent.UpdateCombatant (ORKFramework.GUIBox box, ORKFramework.Combatant combatant, Boolean isBestiary, Rect contentBounds, Rect previousBounds)
ORKFramework.CombatantHUDWrapper.CreateHUDContent (ORKFramework.GUIBox box, Boolean adjustWidth, Boolean adjustHeight, UnityEngine.Rect& bounds)
ORKFramework.DialogueContent.CreateDataContent (HUDWrapperPlacement placement, System.Single& contentHeight, Rect textBounds)
ORKFramework.DialogueContent.CalculateContent (Single baseWidth, Boolean recalced)
ORKFramework.DialogueContent.Init (ORKFramework.GUIBox box)
ORKFramework.GUIBox.Tick (Single t)
ORKFramework.GUIHandler.Tick (Single t)
ORKFramework.GUIHandler.Tick ()
ORKFramework.ORKCore.FireTick ()
ORKFramework.ORKHandler.Update ()

I was cleaning my project days ago and deleted one unused render texture in folder. Assumed it may be that issue, except I'm not using any render textures, just prefabs as images in combatant menus.

Now what happens is that it stays in black screen and I get 100 these errors every second. It used to work days ago without problems.

When I disable the portrait in my Menu Screen setup, error disappears....

Any suggestions? I'm using 2.27.1 ORK with Unity 2017.4.27.

Thanks, Machal
Post edited by Machal on
  • Hm, based on that error I'd say you have no Render Texture selected - either in the default settings in Menus > Menu Settings > Prefab View Settings or in whatever portrait you might override the default camera settings.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited January 2020
    Right...Menu -> Menu Settings...Ok, so it was using a Render Texture...It's been years since I've set that up...why is that a need, please?

    I thought it uses whole prefab on it's own according the Menu Screen -> Status Element parametres...

    I've deleted it, because it's 2.8mb big, so that's quite a lot, but if it's necessary, then whatever...
    Post edited by Machal on
  • Well, to have a prefab as part of your UI, it needs to be a texture that's displayed by the UI. To do that, ORK spawns the prefab (somewhere off-screen) and uses a camera to render it on the render texture, which is displayed in the UI.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thanks for the explanation. It isn't explained in the combatant menu 'prefab view' part, so I've forgot about the style :)
Sign In or Register to comment.