Hot glue doesn't work too good as a resin and I would not recommend using hot glue from a hot glue gun as resin.
The best thing to do when you need to use resin is to buy some resin based glue that is made for use when you need resin.
I tried using a hot glue gun with hot glue as resin before and it worked somewhat but not very good.
You can make some resin glue at home if you have the ingredients which are 1 part charcoal to 3 parts pine resin.
However if you don't have the ingredients to make resin glue at home it would be best to just buy some resin glue online or from a hardware store or some craft stores even have resin glue at a decent price.