Skip to content

Maybe simplest way to communicate with strapi from unity, go, just try it.

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

gbviktor/hwt-integrate-strapi-unity

Repository files navigation

hwt-integrate-strapi-unity in development

Maybe simplest way to communicate with Strapi from Unity, go, just try it.

Install via Unity Package Manager

image

https://github.com/gbviktor/hwt-integrate-strapi-unity.git

Setup Strapi v4.0 and above


if you use a Strapi Version 4.0 and above, please install a Plugin Transformer and setup this configuration:

//remove the attributes key from the response and shift all of its properties up one level
removeAttributesKey = true
//remove the data key from the response and shift the attribute data to be top level
removeDataKey = true

Usage

Get Repository and All Items

//MyVector3 is a example model with interface implementation IStrapiEntityType
//1.Generate token in Strapi

var strapi = new Strapi("http://localhost:1337","Bearer ...");

var positionsRepository = strapi.CreateRepository<MyVector3>("api/positions");

List<MyVector3> res = positionsRepository.GetAll();
MyVector3 newPosition =positionsRepository.Add(new MyVector3(0,1,0));
Entity<MyVector3> foundedByIdEntity = positionsRepository.GetEntity(0);
MyVector3 foundedById = positionsRepository.Get(0);
MyVector3 updated = positionsRepository.Update(foundedByIdEntity);
bool success = positionsRepository.Delete(foundedByIdEntity);

About

Maybe simplest way to communicate with strapi from unity, go, just try it.

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published

Languages