playMaker

Author Topic: How use "Resoucers Load"[SOLVED]  (Read 1126 times)

Miniking

  • Playmaker Newbie
  • *
  • Posts: 4
How use "Resoucers Load"[SOLVED]
« on: May 30, 2020, 07:04:29 PM »
I have a problem how use this.
I try All ways to find  a texture image in folder, I try:
Assets/Cards/XXX.jpg
Cards/XXX.jpg 
//Assets/Cards/XXX.jpg
//Cards/XXX.jpg
//XXX.jpg
And no any response , only a blank Var  :(

+ Any convert String to Int Dont work! 
« Last Edit: May 31, 2020, 04:20:45 PM by Miniking »

nFighter

  • Beta Group
  • Full Member
  • *
  • Posts: 174
    • multiplayer adult fighting
Re: How use "Resoucers Load"
« Reply #1 on: May 30, 2020, 09:48:30 PM »
The answer is already at the topic title :D
You should place all your stuff in the folder named "Resources".

//Assets/Resources/xxx  [EDITED: don't put the extension of the file in the path]

https://docs.unity3d.com/ScriptReference/Resources.Load.html
« Last Edit: June 01, 2020, 02:43:51 AM by jeanfabre »
indie developer of multiplayer adult fighting
http://nakedfighter3d.com

Miniking

  • Playmaker Newbie
  • *
  • Posts: 4
Re: How use "Resoucers Load"
« Reply #2 on: May 30, 2020, 11:16:58 PM »
Dont work :
//Assets/Resources/xxx.jpg

to beters explain, the action "Resource Load"
Need :
Path             //Assets/Resources/xxx.jpg
Type var       Texture
Store Asset   VarTest

I dont load any texture to var :(
« Last Edit: May 30, 2020, 11:35:52 PM by Miniking »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: How use "Resoucers Load"
« Reply #3 on: May 31, 2020, 03:17:24 AM »
Hi.
Resources load can load what's 'inside' a Resources folder.

Best is to use sub folders.

Create a folder called Resources anywhere in the project.

Then create a folder inside it (call it "MyImages" for example)
Then inside it place you image (xxx.jpg)

In the action, set the Path of whats "behind" Resources/
Also do not add the .jpg extension.

So in this case it would be "MyImages/xxx"

Miniking

  • Playmaker Newbie
  • *
  • Posts: 4
Re: How use "Resoucers Load"
« Reply #4 on: May 31, 2020, 04:19:54 PM »
Yeahhhhhhhhhhh now work fine!
Thank you for this great Help!!!!
 ;D ;D ;D ;D ;D ;D