You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a new content of NewTestContent type in Content Manager and publish it: items.newTestContent.myTestContent
Add this method to the microservice:
[ClientCallable]publicasyncTaskTest1(){try{InventoryUpdateBuilderiub=newInventoryUpdateBuilder();iub.AddItem("items.newTestContent.myTestContent",newDictionary<string,string>());awaitServices.Inventory.Update(iub);varitems=awaitServices.Inventory.GetItems(newItemRef("items.newTestContent.myTestContent"));for(inti=0;i<items.Count;i++){ItemContentitemContent=items[i].ItemContent;BeamableLogger.Log($"Type: {itemContent.ContentType}, Id: {itemContent.Id}, Name: {itemContent.ContentName}");NewTestContentconcreteItem=itemContentasNewTestContent;// As resolves to null instead of NewTestContent if(concreteItem==null){BeamableLogger.LogError("The item is null");}}}catch(Exceptione){BeamableLogger.LogException(e);}}
Call the microservice endpoint from newly created BeamContext in the Unity.
User is unable to cast to a custom item content.
Steps
NewTestContent
type in Content Manager and publish it:items.newTestContent.myTestContent
Expected result
Type: items.newTestContent, Id: items.newTestContent.myTestContent, Name: myTestContent
concreteItem
is not nullCurrent result
Type: items, Id: items.myTestContent, Name: myTestContent
concreteItem
is nullMetadata
2.0.2
of engine integration,3.0.2
for Microservices and CLIThe text was updated successfully, but these errors were encountered: