Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

tejgrover

3
Posts
1
Following
A member registered May 31, 2021

Recent community posts

Amazing concept! Amazing Game!  Loved playing it!

@Donat01k please provide me an example of how multiple photos are selected

hello there, I am a student learning unity and recently came across your amazing asset on unity asset store. I tried contacting  you on forum thread but unable to do so. I need Help!! pls provide an example script for multiple image pick from gallery on your GitHub readme please!

like following script is for single Image pick

private void PickImage( int maxSize ) { 	NativeGallery.Permission permission = NativeGallery.GetImageFromGallery( ( path ) => 	{ 		Debug.Log( "Image path: " + path ); 		if( path != null ) 		{ 			// Create Texture from selected image 			Texture2D texture = NativeGallery.LoadImageAtPath( path, maxSize ); 			if( texture == null ) 			{ 				Debug.Log( "Couldn't load texture from " + path ); 				return; 			}  			// Assign texture to a temporary quad and destroy it after 5 seconds 			GameObject quad = GameObject.CreatePrimitive( PrimitiveType.Quad ); 			quad.transform.position = Camera.main.transform.position + Camera.main.transform.forward * 2.5f; 			quad.transform.forward = Camera.main.transform.forward; 			quad.transform.localScale = new Vector3( 1f, texture.height / (float) texture.width, 1f );  			Material material = quad.GetComponent<Renderer>().material; 			if( !material.shader.isSupported ) // happens when Standard shader is not included in the build 				material.shader = Shader.Find( "Legacy Shaders/Diffuse" );  			material.mainTexture = texture;  			Destroy( quad, 5f );  			// If a procedural texture is not destroyed manually,  			// it will only be freed after a scene change 			Destroy( texture, 5f ); 		} 	}, "Select a PNG image", "image/png" );  	Debug.Log( "Permission result: " + permission ); }