Page 2 of 5

Re: [Unity] v1.2 Preview

Posted: 30 Sep 2014, 19:02
by jsantos
I'm getting the following exception on x64 build but it does not occur on x86 build. Here is the exception
x64 is not included in the current beta. What is happening is that it is using the dll from the v1.1 version because you probably upgraded from that version.

Thanks for reporting!

Re: [Unity] v1.2 Preview

Posted: 30 Sep 2014, 19:04
by jsantos
Thank you for your answer but I wanted to know the update cycle of the 1.2 beta version. :) 2-4 weeks appear to be a bit long for that, especially as there could be breaking bugs in there. If that's the case I don't think testing it would be really feasible. :(
Sorry I didn't understand your question. I said that whenever the v1.2 becomes stable the update cycle will be the same as in v1.1 (2-4 weeks). But in the beta phase, we will update more frequently. At least, right now, that we are providing only x86 binaries. In fact, we are preparing a new version for today.

Re: [Unity] v1.2 Preview

Posted: 30 Sep 2014, 19:47
by kayrk
After attaching unity vs and debugging this is where the issue is. http://gyazo.com/d6852b027c55857d7b28912f234a9c33 System.InvalidOperationException: Native type is not registered. Hopefully you guys can help me out with this.
We fixed both issues. We are going to release a new beta in the next 24h.

Thanks for reporting!
Great!

Re: [Unity] v1.2 Preview

Posted: 02 Oct 2014, 14:17
by jsantos
New version available with the problems reported here (and a lot more) fixed!

Re: [Unity] v1.2 Preview

Posted: 02 Oct 2014, 18:37
by kayrk
So with the new version I am getting a new error with my RenderTexture code.
                renderTexture = gameManager.GetComponent<Minimap>().Output; //render texture
                Noesis.ImageBrush texBrush = new Noesis.ImageBrush();
                texBrush.ImageSource = new Noesis.TextureSource(renderTexture);
                MinimapRenderGrid.Background = texBrush;
Exception: device->CreateShaderResourceView(mTexture, 0, &mView)[0x80070057]
Noesis.Error.Check () (at Assets/Plugins/NoesisGUI/Scripts/Core/NoesisError.cs:60)
Noesis.UIRenderer.Noesis_UpdateRenderer (Int32 rendererId, Double timeInSeconds) (at Assets/Plugins/NoesisGUI/Scripts/Core/NoesisUIRendererImports.cs:141)
Noesis.UIRenderer.Update (Double timeInSeconds, AntialiasingMode aaMode, TessellationMode tessMode, TessellationQuality tessQuality, RendererFlags flags, Boolean enableMouse, Boolean enableTouch, Boolean enablePostProcess, Boolean flipVertically) (at Assets/Plugins/NoesisGUI/Scripts/Core/NoesisUIRenderer.cs:87)
NoesisGUIPanel.LateUpdate () (at Assets/Plugins/NoesisGUI/Scripts/NoesisGUIPanel.cs:179)
Also when i debug this using unity vs I get the same error as before http://gyazo.com/2e5058edfdcf7804a3636dd7293ea18c

Re: [Unity] v1.2 Preview

Posted: 02 Oct 2014, 18:44
by jsantos
Could you please this minimal sample and tell me if it works?
<Grid
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
</Grid>
using UnityEngine;
using System.Collections;
using Noesis;

public class Test : MonoBehaviour {

	// Use this for initialization
	void Start () 
	{
		UnityEngine.Texture2D texture =	Resources.Load("cat", typeof(Texture2D)) as Texture2D;

		Noesis.ImageBrush brush = new Noesis.ImageBrush();
		brush.ImageSource = new Noesis.TextureSource(texture);

		var noesisGUI = GetComponent<NoesisGUIPanel>();
		var grid = noesisGUI.GetRoot<Grid>();

		grid.Background = brush;
	
	}
	
	// Update is called once per frame
	void Update () 
	{
	
	}
}
Attach the script to a camera, copy the xaml to the camera also and copy a texture to /Assets/Resources/cat.jpg.

Thanks!

Re: [Unity] v1.2 Preview

Posted: 02 Oct 2014, 18:51
by kayrk
Yes this does work.

Re: [Unity] v1.2 Preview

Posted: 02 Oct 2014, 18:55
by jsantos
So if you change in your code this line
renderTexture = gameManager.GetComponent<Minimap>().Output; //render texture
to
renderTexture = Resources.Load("cat", typeof(Texture2D)) as Texture2D;
does it work?

If affirmative, what kind of object is the render texture stored inside the minimap component.

Re: [Unity] v1.2 Preview

Posted: 02 Oct 2014, 19:01
by kayrk
I can't do that cause renderTexture is a RenderTexture not a Texture2D. Output type is RenderTexture. If you need me to post my Minimap class I can.

Re: [Unity] v1.2 Preview

Posted: 02 Oct 2014, 19:12
by jsantos
My fault... :( We only tried with normal textures, no render textures in DX11. I am getting the same error here now. Let me see how to solve it and generate a new version of the Beta.