Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

Unity upload image to project

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEditor;
using System.IO;

public class OpenImagesplz : MonoBehaviour
{
    string path;
    public RawImage image;

    public void OpenExplorer()
    {
        path = EditorUtility.OpenFilePanel("Overwrite with png", "", "png");
        GetImage();
    }

    void GetImage()
    {
        if(path != null)
        {
            UpdateImage();
        }
    }
    void UpdateImage()
    {
        WWW www = new WWW("file:///" + path);
        image.texture = www.texture;
    }
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# multiplicate char 
Csharp :: how to find the biggest number in c# 
Csharp :: unity hide mouse first person 
Csharp :: c# trimend substring 
Csharp :: c# convert string to array 
Csharp :: vb.net delete folder if exists 
Csharp :: last index for array c# 
Csharp :: Get logged in user in ASP.Net 
Csharp :: 2d array rows and columns in c# 
Csharp :: DataGridView ComboBox column selection changed event 
Csharp :: factorial of number 
Csharp :: modal barrier in flutter 
Csharp :: c# switch expression pattern matching 
Csharp :: c# check that value is not null or 0 
Csharp :: gql query with parameters 
Csharp :: dotnet core encryption and decryption 
Csharp :: create class for database connection in c# 
Csharp :: hide external app from taskbar 
Csharp :: install active directory windows server 2019 powershell 
Csharp :: wait c# 
Csharp :: c# run a scheduled task 
Csharp :: out c# 
Csharp :: exception 
Csharp :: get camera position unity 
Csharp :: Moq Unittest with ILogger 
Csharp :: disable button netbeans 
Csharp :: fix autofill issue asp.net mvc 
Csharp :: Max upload size for ASP.MVC CORE website 
Csharp :: pcamera 
Csharp :: C# program to find sum of array elements 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =