Tuesday, 11 April 2023

Basic components for an object, physics

 Lets see how to make an animated object on our game.

We need an IMAGE that we will drag and drop to our EDITOR...

Backgrounds: how to add it

 Do you know how  to add a background to your game/app in Unity?


Lets look how...


Thursday, 30 March 2023

Unity SpriteRenderer "error"

 how to solve this error...

error CS1061: 'SpriteRenderer' does not contain a definition for 'IsUsingDeformableBuffer'

TO SOLVE THIS ERROR, GO TO "WINDOW-PACKAGEMANAGER" AND RESET PACKAGES:


 
 

"got to PackageManager, type 2D remove all, and install it again!"

thanks to https://stackoverflow.com/questions/71168878/unity-spriterenderer-error-what-i-need-to-do


Wednesday, 29 March 2023

Access external scripts

 

Acceder a scripts externos

Si tenemos dos scripts:

1- main.cs

2- OL1AScript.cs

Y queremos acceder desde MAIN («1») al script «2»:


EN PRIMER LUGAR, AMBOS SCRIPTS DEBEN ESTAR ASIGNADOS A UN OBJETO , mediante el editor (uno cualquiera que creemos, como ‘objeto1’)

MAIN.CS

public OL1AScript ol1ascript1;

main()

ol1ascript1 = GameObject.Find("objeto1").GetComponent<OL1AScript>();

Intellisense

Intellisense (auto code)

We go to:

EDIT-PREFERENCES-EXTERNAL TOOLS

Select «Visual Studio».

IN «Generate csproj files», check everything

 


Tuesday, 28 March 2023

HUGE COMPONENTS SIZE

Componentes «gigantes»

PROBLEM: big size components on our editor. 

SOLVE:

add your  «Camera» inside your «Canvas»:

1- in «Canvas», «Render Mode» select «Screen Space-Camera»


2- drag and drop «Main Camera» to «Render Camera»  Canvas ( inspector)

Basic components for an object, physics

 Lets see how to make an animated object on our game. We need an IMAGE that we will drag and drop to our EDITOR...